Table of Contents

Name

gv - a PostScript and PDF previewer

Synopsis


gv [ filename ]
   [-monochrome] [-gra
yscale] [-colo
r]
   [-[no]safer] [-[no]
quiet] [-argum
ents <arguments>]
   [-page <label>] [-[
no]center]
   [-media <media>]
   [-portrait] [-lands
cape] [-upside
down] [-seascape]
   [-scale <n>] [-scal
ebase <n>]
   [-swap] [-noswap]
   [-antialias] [-noan
tialias]
   [-dsc] [-nodsc]
   [-eof] [-noeof]
   [-pixmap] [-nopixma
p]
   [-watch] [-nowatch]
   [-?] [-h] [-help] [-v]
   [-resize] [-noresize]
   [-geometry [<width>][x<height>][{+-
}<xoffset>{+-}<yoffset>]
   [-ad <resource file>]
   [-style <resource file>]
   [-spartan]
   [<other toolkit options>]

Description

gv allows to view and navigate throu gh PostScript and PDF doc uments on an X display by providing a user in terface for th e ghostscript interpreter. Please note that gv is derived from Tim Theisen's ghostview 1.5.

Options

filename
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp The name of the file t o be displayed . The file ending ".ps " may be omi tted. "filename" may poi nt to a compre ssed file (gzipped, zipped or co mpressed). Viewing PDF files requ ires at least ghostscript version 4.x.
-ad <resource file>
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Read and use additiona l resources fr om the file <resource file>. These resources have h igher priority than those provided in the context of the -style <resour ce file> option.
-antialias, -noantiali as
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether to use antiali asing.
-arguments <ar guments>
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Start ghostscript with additional op tions as specified by the string <arguments>.
-center, B-nocenter
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether the page shoul d be centered automatically.
-dsc, -n odsc
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Determines if document structuring c onvention (DSC) comments should be respected or ignored. If -nodsc is used gv w ill not attemp t to examine the structure of the d ocument but wi ll pass the file to the ghostscript int erpreter as a whole. In this case no page numbers are shown and freely m oving around i n the document is not possible. This option may help w hen viewing fi les not conforming to the document struct uring conventi ons.
-eof, -n oeof
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Defines the behaviour of the postscr ipt scanner used to examine the structure of the documen t. If -noeof is used the scanner will i gnore end of file (EOF) comments. This may hel p when viewing documents which import other documents without encl osing them wit hin the proper "BeginDocument" and "E ndDocument" co mments. If -eof is used, the s canner treats an EOF comment as marking the end of the file.
-pixmap, B-nopixmap
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp If -pixmap is used gv tries to maint ain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used t he X Server is responsible for maintaining obscured p ortions of the displayed page (see also the "useBa ckingPixmap" resource).
-v
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Print the version numb er of gv to st andard output and exit.
-h, -? P
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Display a short help m essage and exi t.
-help
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Display a more explici t help message and exit.
-scale <n>
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Selects the scale entr y <n> relative to the scale 1.0. <n> must be an integer .
-scalebase <n>
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Selects the scale base <n>.
-monochrome , -grayscal e, -color
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Sets the color palette to be used.
-media <media>
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Selects the paper size to be used. V alid values are names of paper sizes that appea r in the list of page medias as given by the medias resource .
-page <label>\ fP
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Display the page with label <label> first.
-portrait, -landscape\ fP, -seascape, -upsidedown
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Sets the orientation.
-quiet, -noquiet
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether to start ghost script with th e -dQUIET option.
-resize, B-noresize
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether gv is allowed to automatical ly fit the size of its window to the size of th e displayed page.
-safer, -nosafer
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether to start ghost script with th e -dSAFER option.
-spartan
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp This is a shortcut for "-style gv_ spartan.dat".
-style <resour ce file>
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Read and use additiona l resources fr om the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option.
-swap, - noswap
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether to interchange the meaning o f the orientations landscape and seascape .
-watch, -nowatch
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp The -watch option caus es gv to check the document periodically. If chang es are detecte d gv will automatically display the newer vers ion of the file. The document is by def ault checked o nce every second. This can be changed vi a the watchFil eFrequency resource. Note that sending gv t he SIGHUP sign al also causes an update of the displ ayed document. This method may be used by documen t creators to trigger gv remotely.

Resources

Resource files In general gv does not depend on any external resource files. However, when starting gv, preferenc es are read from 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp a system specific r esource file P. The name of this file is as describe d by the "XFILESEARCHPATH" environment variable, or, if this va riable is not defined, implementation depende nt. In most ca ses it is "/usr/X11/lib/X11/ap p-defaults/GV\ *U. Administrators may wan t to modify th is file in order to set up gv according to the local needs of their system. 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp a user specific res ource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEA RCHPATH" environment variable. The files "gv_user.a d" and "gv _system.ad" (located in the library directory of gv, which is most p robably either "/usr/local/lib/gv/\ *U or "/usr/ lib/gv/" may serve as a basis for constructing the u ser and system specific resource files. Note that the user and system specif ic resource files are not the only sources of preferences taken into ac count when gv is started. However, in practice t hese are the m ost important. Resources of gv The following describe s some of the resources of gv. The precise syntax of some of the re source values may be inferred from the appe nded default s ystem specific resource file.

antialias
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether antialiasing s hould be used. Valid values are "Tr ue" and "False".
autoCenter
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether the displayed page should au tomatically be centered (for instance when ope ning a new fil e). Valid values are "Tr ue" and "F alse".
autoResize
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "Tr ue" and "F alse".
confirmPrint
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether printing requi res an extra c onfirmation. Valid values are "Tr ue" and "F alse".
confirmQuit
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether leaving gv req uires extra co nfirmation. Valid values are "0\ *U (Never), Q1" (When processing) and "2" (Alway s). The default value is \ *Q1", which causes a confirmation request when trying t o leave gv in the presence of pen ding PDF to Po stscript conversions.
scrollingEyeGuide
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp If this resource is QTrue" scrol ling via the keyboard causes a temp orary border t o be drawn around the previously visible are a of the page. Allowed values are " True" and "False".
ignoreEOF
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Defines the behaviour of the postscr ipt scanner as described in the Options section . Valid values are "Tr ue" and "F alse".
respectDSC
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "Tr ue" and "F alse".
reverseScrolling
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Defines the interpreta tion of direct ions when scrolling with the mou se. Valid values are "Tr ue" and "F alse".
swapLandscape
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether the meaning of "landscape\ *U and "seacape" should be interchanged . Valid values are "Tr ue" and "F alse".
scratchDir
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Specifies a directory used to store temporary data.
defaultSaveDir
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Specifies the default destination di rectory for files to be saved.
useBackingPixmap
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp If the value of this r esource is " False" the X Server is advised that saving off-screen pi xels of the displayed page would be beneficial (m aintaining bac king store). In this case gv does not actively main tain the conte nts of the page but relies on the X Server. The s erver is, howe ver, always free to stop maintaining backing ba cking store. If the value of this r esource is " True" the X Server is advised that mainta ining backing store is not useful. In this case gv attemp ts to allocate a sufficiently large pixmap to store the contents of the display ed page.
watchFile
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether the document s hould be check ed periodically and updated automatically if chan ges are detect ed. Valid values are "Tr ue" and "F alse".
watchFileFrequenc y
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Defines the time in mi lliseconds ela psing between successive checks of the document when watchFil e is set to "True". Allowed values must be larger than 5 00.
printCommand
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp The command used for p rinting a file . The command may contai n multiple '%s ' wildcards which will be replaced by the name o f the file to be printed.
gsInterpreter
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp The command used to st art the ghosts cript interpreter.
gsCmdScanPDF
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp The command used to ex tract document structuring comments from a PDF file.
gsCmdConvPDF
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp The command used to co nvert a PDF fi le to PostScript.
gsX11Device
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp The ghostscript comman d line option which activates the "X11" device.
gsX11AlphaDevice
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp The ghostscript comman d line option which activates the "X11" device with antialiasing e nabled.
gsSafer
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Determines whether gho stscript shoul d be started with the "-dSAFER" command line option.
gsQuiet
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Determines whether gho stscript shoul d be started with the "-dQUIET" command line option.
gsArguments
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp May be used to provide additional co mmand line options for the ghostscript interprete r. Starting gv with the \ *Q-arguments < arguments>" option will override t his resource s etting.
magMenu
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Describes the menu tha t pops up when preparing to to zoom an area of the displayed pag e.
dirs
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Defines a list of dire ctories access ible via the Directories menu in the file selec tion window. The special value "H ome" corresp onds to the users home directory, the value "Tmp" co rresponds to t he scratch directory as defined by the scratchDir reso urce.
filter
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Defines the default fi lter to be use d when displaying a directory contents in the file s election windo w. A filter is specified according to t he syntax


   <filter>    := [<fi
lespecs>] [no 
<filespecs>]
   <filespecs> := <fil
espec> [<files
pecs>]
   <filespec>  := file
name possibly 
including wildcards '*'
                  whic
h match any ch
aracter.

Example: The filter


   GV*filter: *.ps *.p
df no .*

screens out all files with names sta rting with a dot and keeps of the remai ning ones only those which end on ".ps" or ".pd f".

filters
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Defines a list of filt ers offered in the Filters menu of the file selec tion window. The filter "None" has a special meaning causing all files to b e displayed wh en the corresponding menu entry is selected .
miscMenuEntries
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Describes the menu tha t pops up when clicking with the third mouse button on the displayed page. The value of this reso urce is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line".
showTitle
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Whether the name of th e displayed do cument should be shown in the title bar of the windo w. The name of gv's icon will also change accordingly if this re source is set to "True".
maximumWidth, max imumHeight
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", op tionally combi ned with a positive or negative offset. The default values lis ted above prov ide examples for this syntax. "screen" will auto matically be r eplaced by the size of the screen.
minimumWidth, min imumHeight
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200.
scale
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Sets the initial scale . The value of this resource is the offset of the scale to be sel ected relative to the scale 1.0 in the the "Scale" menu.
scaleBase
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Selects the initial sc ale base. The value of this resource should be a positive integer.
scales
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Defines the available scales bases a nd scales in the "Scale" menu.
orientation
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Sets the initial orien tation. Valid values are "portrait", "lan dscape","s eascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments.
fallbackOrientati on
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Defines the paper-size to be used wh en automatic orientation detection fails. Vali d values are "portrait", "lan dscape","s eascape" and "upside-down".
medias
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp A list describing the page medias kn own to gv. List entries starting with "!" o r "#" will not appear in the "Media" menu but w ill still be u sed for automatic paper size detection.
pagemedia
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Sets the paper size. Allowed values are as given in the a bove list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments.
fallbackPageMedia
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Defines the paper-size to be used wh en automatic paper-size detection fails. Vali d values are a s given in the above list of paper-sizes. The default user an d system speci fic resource file


GV.pageMedia:         
  automatic
GV.orientation:       
  automatic
GV.fallbackOrientation
: portrait
GV.swapLandscape:     
  False
GV.autoCenter:        
  True
GV.antialias:         
  False
GV.respectDSC:        
  True
GV.ignoreEOF:         
  True
GV.confirmPrint:      
  True
GV.reverseScrolling:  
  False
GV.scrollingEyeGuide: 
  True
GV.autoResize:        
  True
GV.maximumWidth:      
  screen-20
GV.maximumHeight:     
  screen-44
GV.minimumWidth:      
  400
GV.minimumHeight:     
  430
GV.confirmQuit:       
  1
GV.watchFile:         
  False
GV.watchFileFrequency:
  1000
GV.showTitle:         
  True
GV.miscMenuEntries:   
  redisplay   
    \n\
                      
  # update    
    \n\
                      
  stop        
    \n\
                      
  line        
    \n\
                      
  toggle_curre
nt  \n\
                      
  toggle_even 
    \n\
                      
  toggle_odd  
    \n\
                      
  unmark      
    \n\
                      
  line        
    \n\
                      
  print_all   
    \n\
                      
  print_marked
    \n\
                      
  save_all    
    \n\
                      
  save_marked
GV.scale:             
  0
GV.scaleBase:         
  1
GV.scales:            
  Natural size
,   1.000,  screen  \n\
                      
  Pixel based,
    1.000,  pixel   \n\
                      
  0.100,      
    0.100           \n\
                      
  0.125,      
    0.125           \n\
                      
  0.250,      
    0.250           \n\
                      
  0.500,      
    0.500           \n\
                      
  0.707,      
    0.707           \n\
                      
  1.000,      
    1.000           \n\
                      
  1.414,      
    1.414           \n\
                      
  2.000,      
    2.000           \n\
                      
  4.000,      
    4.000           \n\
                      
  8.000,      
    8.000           \n\
                      
  10.00,      
    10.00
GV.medias:            
  Letter,     
    612     792     \n\
                      
  # LetterSmal
l,  612     792     \n\
                      
  Legal,      
    612     1008    \n\
                      
  Statement,  
    396     612     \n\
                      
  Tabloid,    
            792     1224    \n\
                      
  Ledger,     
    1224    792     \n\
                      
  Folio,      
    612     936     \n\
                      
  Quarto,     
    610     780     \n\
                      
  # 7x9,      
    504     648     \n\
                      
  # 9x11,     
    648     792     \n\
                      
  # 9x12,     
    648     864     \n\
                      
  # 10x13,    
            720     936     \n\
                      
  10x14,      
    720     1008    \n\
                      
  Executive,  
    540     720     \n\
                      
  # A0,       
    2384    3370    \n\
                      
  # A1,       
    1684    2384    \n\
                      
  # A2,       
    1191    1684    \n\
                      
  A3,         
    842     1191    \n\
                      
  A4,         
    595     842     \n\
                      
  # A4Small,  
    595     842     \n\
                      
  A5,         
    420     595     \n\
                      
  # A6,       
    297     420     \n\
                      
  # A7,       
    210     297     \n\
                      
  # A8,       
    148     210     \n\
                      
  # A9,       
    105     148     \n\
                      
  # A10,      
    73      105     \n\
                      
  # B0,       
    2920    4127    \n\
                      
  # B1,       
    2064    2920    \n\
                      
  # B2,       
    1460    2064    \n\
                      
  # B3,       
    1032    1460    \n\
                      
  B4,         
    729     1032    \n\
                      
  B5,         
    516     729     \n\
                      
  # B6,       
    363     516     \n\
                      
  # B7,       
    258     363     \n\
                      
  # B8,       
    181     258     \n\
                      
  # B9,       
    127     181     \n\
                      
  # B10,      
    91      127     \n\
                      
  # ISOB0,    
            2835    4008    \n\
                      
  # ISOB1,    
            2004    2835    \n\
                      
  # ISOB2,    
            1417    2004    \n\
                      
  # ISOB3,    
            1001    1417    \n\
                      
  # ISOB4,    
            709     1001    \n\
                      
  # ISOB5,    
            499     709     \n\
                      
  # ISOB6,    
            354     499     \n\
                      
  # ISOB7,    
            249     354     \n\
                      
  # ISOB8,    
            176     249     \n\
                      
  # ISOB9,    
            125     176     \n\
                      
  # ISOB10,   
    88      125     \n\
                      
  # C0,       
    2599    3676    \n\
                      
  # C1,       
    1837    2599    \n\
                      
  # C2,       
    1298    1837    \n\
                      
  # C3,       
    918     1296    \n\
                      
  # C4,       
    649     918     \n\
                      
  # C5,       
    459     649     \n\
                      
  # C6,       
    323     459     \n\
                      
  # C7,       
    230     323     \n\
                      
  # DL,       
    312     624
GV.magMenu:           
  2,      2   
    \n\
                      
  4,      4   
    \n\
                      
  8,      8   
    \n\
                      
  16,     16  
    \n\
                      
  32,     32  
    \n\
                      
  64,     64
GV*Ghostview.backgroun
d:            
    white
GV*Ghostview.foregroun
d:            
    black
GV.gsInterpreter:     
  gs
GV.gsCmdScanPDF:      
  gs -dNODISPL
AY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps
-c quit
GV.gsCmdConvPDF:      
  gs -dNODISPL
AY -dQUIET  -dNOPAUSE -sPSFile=%s %s -c
quit
GV.gsX11Device:       
  -sDEVICE=x11
GV.gsX11AlphaDevice:  
  -dNOPLATFONTS -sDEVICE=x11alpha
GV.gsSafer:           
  True
GV.gsQuiet:           
  True
GV.gsArguments:
GV.uncompressCommand: 
  gzip -d -c %s > %s
GV.printCommand:      
  lpr
GV.scratchDir:        
  ~/
GV.defaultSaveDir:    
  ~/
GV.fallbackPageMedia: 
  a4
GV.useBackingPixmap:  
  True
GV*dirs:              
  Home\n\
                      
  Tmp\n\
                      
  /usr/doc\n\
                      
  /usr/local/doc
GV*filter:            
  no .*
GV*filters:           
  None\n\
                      
  *.*ps* *.pdf*  no  .*\n\
                      
  *.*ps*   no  .*\n\
                      
  *.pdf*  no  .*\n\
                      
  no  .*

Mouse and key bind ings

Mouse bindings in the Main a nd the Zoom window
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp The following mouse ev ents are defin ed when the mouse pointer is either on the displ ayed page or o n a zoomed area: 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp
- press but ton 1, move mo use, release button 1
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Scrolls the displayed page 'proporti onally'.
- press but ton 3, move mo use, release button 3
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Scrolls the displayed page 'absolute ly'.
- double-cl ick with butto n 1
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp In the main window thi s displays the previous/next page if the double-click oc cured in the l eft/right half of the window. In a zoom window it do es nothing.
- press but ton 2, release button 2
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Pops up a small menu w hich allows to choose a magnification for a certain area aro und the curren t mouse position. After selecting a magn ification a zo om window pops up displaying the area at the chosen sc ale.
- press but ton 2, move mo use, release button 2
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp This draws and thereby defines a rec tangular region which can be displayed in a zoom window. T he magnification for the area can be selected b y means of a p opup menu which appears after releasing button 2.
- press bu tton 1, press button 2
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Redisplays the current page. This ev ent sequence works only in the main window.
- press but ton 3, release button 3
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Pops up a small menu w hich offers a few standard actions like 'Redisplay', 'Mar k Page', etc.
Mouse bindings in the File S election popup
The following mouse ev ents are defin ed when the mouse pointer is in the window of eithe r a file or a directory list:
- press but ton 1, move mo use, release button 1
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Scrolls a file or dire ctory list 'pr oportionally'.
- press but ton 2, move mo use, release button 2
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Scrolls a file or dire ctory list 'ab solutely'.
- press but ton 2, release button 2
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Scrolls a file or dire ctory list one page up/down if the button was pres sed in the upp er/lower half of the list.
- double-cl ick with butto n 1 on a filename
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Selects the file and c loses the File Selection popup.
- click wit h button 1 on a directory name
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Causes the contents of this director y to be displayed.
Mouse bindings in the Table of Contents
The following mouse ev ents are defin ed when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents):
- press but ton 1, move mo use, release button 1
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Scrolls the table of c ontents.
- press but ton 1 on a pag e number
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Go to this page.
- press but ton 2 on a pag e number
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Mark this page if it i s unmarked, bu t unmark it if it is marked.
- press but ton 2, move mo use, release button 2
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Marks/unmarks all unma rked/marked pa ges in the region crossed by the mouse p ointer during the movement.
Mouse bindings in the Panner widget
The Panner widget is t he rectangular region located close to the left edge of the main window. It ind icates the size and the position of the visibl e area of the current page relative to the total page. The following mouse ev ents are defin ed when the mouse pointer is in this region:
- press but ton 1, move mo use
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Scrolls the displayed page.
- press but ton 2
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Display the previous p age.
- press but ton 3
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Display the next page.
Mouse bindings in the
The ">>" and "<<" butt ons are used t o move to another page. The f ollowing mouse events are defined:
- press but ton 1
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Move 1 page forward/ba ckwards.
- press but ton 2
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Move 5 pages forward/b ackwards.
- press but ton 3
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Move 10 pages forward/ backwards.
Key Bindings P
The following key even ts are defined in the main window. Those bindings scrolling the page are also defined in zoom popups.


=== Notation:
s-X          means pre
ss "Shift"    
       and key "X"
c-X          means pre
ss "Ctrl"     
       and key "X"
sc-X         means pre
ss "Shift" or 
"Ctrl" and key "X"
=== Miscellaneous keys
:
A            Toggle an
tialiasing on 
and off
O            Open a ne
w file
Q            Quit gv
R            Toggle gv
's resizing be
haviour
I            Respect/I
gnore document
 structuring
W            Watch fil
e / Don't watc
h file
S            Save the 
marked pages
sc-S         Save the 
current file
P            Print the
 marked pages
sc-P         Print the
 current file
c-L          Redisplay
 the current p
age
.            Redispl
ay the current
 page
sc-.         Reopen th
e current file
M            Mark the 
current page
N            Unmark th
e current page
=== Orientation:
7            Orientati
on portrait
8            Orientati
on landscape
9            Orientati
on upside-down
0            Orientati
on seascape
=== Magnification:
sc-6         Select th
e scale entry -6 relative to the scale 1.0
sc-5         Select th
e scale entry -5 relative to the scale 1.0
sc-4         Select th
e scale entry -4 relative to the scale 1.0
sc-3         Select th
e scale entry -3 relative to the scale 1.0
sc-2         Select th
e scale entry -2 relative to the scale 1.0
sc-1         Select th
e scale entry -1 relative to the scale 1.0
^            Select th
e scale 1.0 (for german keyboard layout)
`            Select th
e scale 1.0
1            Select th
e scale entry 1 relative to the scale 1.0
2            Select th
e scale entry 2 relative to the scale 1.0
3            Select th
e scale entry 3 relative to the scale 1.0
4            Select th
e scale entry 4 relative to the scale 1.0
5            Select th
e scale entry 5 relative to the scale 1.0
6            Select th
e scale entry 6 relative to the scale 1.0
+            Select th
e next scale entry
=            Select th
e next scale entry
-            Select th
e previous scale entry
=== Navigating:
Arrow        Scroll in
 the direction of the arrow
s-Up         Scroll co
lumns up   or jump -1 pages
s-Down       Scroll co
lumns down or jump  1 pages
s-Left       Scroll ro
ws left    or jump -1 pages
s-Right      Scroll ro
ws right   or jump  1 pages
c-Up         Jump -1 p
ages (to top/left corner)
c-Down       Jump  1 p
ages (to top/left corner)
c-Left       Jump -5 p
ages (to top/left corner)
c-Right      Jump  5 p
ages (to top/left corner)
D,X,Z,Y,C    Identical
 to arrow up,down,left,left,right
V            Center th
e page
sc-Space     Scroll co
lumns up   or jump -1 pages
Space        Scroll co
lumns down or jump  1 pages
BackSpace    Scroll co
lumns up   or jump -1 pages
Insert       Jump  -5 
pages
Delete       Jump   5 
pages
Home         Go to the
 first page
End          Go to the
 last page
Prior        Jump  -1 
pages
Next         Jump   1 
pages
Keypad 0-9   Highlight
 a page number
Keypad -     Highlight
 previous page number
Keypad +     Highlight
 next page number
Keypad Enter Jump to t
he highlighted page
c-Enter      Jump  -1 
pages
s-Enter      Jump  -1 
pages
Enter        Jump   1 
pages
B            Jump  -1 
pages
F            Jump   1 
pages

Comments about the user interface

1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp

Scales
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp The "Scale" menu w hich allows to view the document at different sizes is divided into t wo parts. The first part shows a list of availa ble scale base s, the second part, separated by a line, l ists the relat ive scales which are applied with respect to the se lected scale b ase. 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp By default two scales bases are avai lable, the "Natural size" and the "Pixel based " base. When choosing the "P ixel based" scale base a relative scale of 1.0 causes one post script point t o correspond to one pixel on the screen. 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp When viewing a documen t at a relativ e scale of 1.0 using the "Natural s ize" base th e page should appear in its real size, as if print ed on paper. For the "Natural siz e" base to w ork properly gv has to know the correct size of th e root window. Automatic detection of this size unfortuna tely only prov ides approximate results, therefore it is best if it is pr ovided by the user. To do so the resource


   GV.screenSize:  <wi
dth> x <height
>

should be added to the "SCREEN_RES OURCES" property of the screen the document is viewed on, with <wid th> and <height> describing the width a nd height of t he root window in units of millimeters. For instance by using the command


   echo "GV.screenSize
: 396 x 291" |
 xrdb -override -screen

a width of 346 mm and a height of 29 1 mm will be used for the "Natural size" sca le base. Alternatively the reso urce


   GV.screenSize_<mach
ine>_<disp>_<s
cr>:  <width> x <height>

may be added to a reso urce file read by gv. Here <machine> ,<disp> and ANGLED) descri be the display on which g v displays the document. For instance, if the d isplay is set to "tic.tac.toe.wo:0.1" the resource should be specified as


   GV.screenSize_tic_0
_1: 396 x 291

Note that this method doesn't work o n VMS. As a last alternative the resource


   GV.screenSize:  <wi
dth> x <height
>

may be added to one of the resource files. However, for obvious reasons this method should be used only on s ingle user machines. 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp

Scrolling
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp It is probably a de fa cto standard f or user interfaces that windows are suppo sed to be scro lled by means of scrollbars attached to their sides. However, for various r easons the use of scrollbars has been minimized in gv. 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Instead, in all window s with obscure d data, scrolling may be performed by pressing button1, movi ng the mouse, then releasing button1 directly in the window . This include s the displayed page, zoom popups, the table of contents a nd the file and directory lists displa yed in the fil e selection popup. 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp
Displaying new versions of a document
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp During document creati on it is usual ly desirable to always display the new est version of the document in work. 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisp lay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisp lay" entry i n the menu that pops up when clicking with the third mous e button anywhere on the displayed page certain ly has the sam e effect. 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp More comfortable is th e "Watch File" feature which may be switched on by sele cting the corr esponding entry in the "State" menu. If a ctivated gv wi ll check every now and then if a new version of the displayed file exists. If so it will be displa yed automatically. By default the file is checked about once every second. 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp Finally it may also be left to the d ocument creating program to trigger gv to updat e its display. To do so the program should send th e SIGHUP signa l to gv. For instance at the en d of a shell s cript generating a postscript file from l atex sources t he line


   kill -SIGHUP <gv_pi
d>

may be added (here CR<gv_pid> is the process id of gv). Executing the scr ipt and thereb y creating a new version of the documen t will then al so cause the result to be displayed instantaneous ly. Please note that this feature is ava ilable only on X11 R6 based systems.

Availability

The source code of the most recent v ersion of gv may be obtained from the foll owing sources:

World Wide Web:
1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp 1 .nr bi 0 .nr ll 0 .nr el 0 .de DS .. .de DE .. .de Pp .ie \n(ll>0 { .ie \n(bi=1 { .nr bi 0 .if \n(t\n(ll=0 {.IP \(bu} .if \n(t\n(ll=1 {.IP \n+(e\n(el.} .} .el .sp .} .el { .ie \nh=1 { .LP .nr h 0 .} .el .PP .} .. .SH Name gv - a PostScript and PDF previewer .SH Synopsis .Pp .DS .sp .ft RR .nf gv [ filename ] [-monochrome] [-grayscale] [-color] [-[no]safer] [-[no]quiet] [-arguments <arguments>] [-page <label>] [-[no]center] [-media <media>] [-portrait] [-landscape] [-upsidedown] [-seascape] [-scale <n>] [-scalebase <n>] [-swap] [-noswap] [-antialias] [-noantialias] [-dsc] [-nodsc] [-eof] [-noeof] [-pixmap] [-nopixmap] [-watch] [-nowatch] [-?] [-h] [-help] [-v] [-resize] [-noresize] [-geometry [<width>][x<height>][{+-}<xoffset>{+-}<yoffset>] [-ad <resource file>] [-style <resource file>] [-spartan] [<other toolkit options>] .DE .fi .ec .ft P .sp .SH Description .Pp .Pp gv allows to view and navigate through PostScript and PDF documents on an X display by providing a user interface for the ghostscript interpreter. .Pp Please note that gv is derived from Tim Theisen's ghostview 1.5. .Pp .SH Options .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "filename" .nr bi 1 .Pp The name of the file to be displayed. The file ending ".ps" may be omitted. "filename" may point to a compressed file (gzipped, zipped or compressed). Viewing PDF files requires at least ghostscript version 4.x. .IP "-ad <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have higher priority than those provided in the context of the -style <resource file> option. .IP "-antialias, -noantialias" .nr bi 1 .Pp Whether to use antialiasing. .IP "-arguments <arguments>" .nr bi 1 .Pp Start ghostscript with additional options as specified by the string <arguments>. .IP "-center, -nocenter" .nr bi 1 .Pp Whether the page should be centered automatically. .IP "-dsc, -nodsc" .nr bi 1 .Pp Determines if document structuring convention (DSC) comments should be respected or ignored. If -nodsc is used gv will not attempt to examine the structure of the document but will pass the file to the ghostscript interpreter as a whole. In this case no page numbers are shown and freely moving around in the document is not possible. This option may help when viewing files not conforming to the document structuring conventions. .IP "-eof, -noeof" .nr bi 1 .Pp Defines the behaviour of the postscript scanner used to examine the structure of the document. If -noeof is used the scanner will ignore end of file (EOF) comments. This may help when viewing documents which import other documents without enclosing them within the proper "BeginDocument" and "EndDocument" comments. If -eof is used, the scanner treats an EOF comment as marking the end of the file. .IP "-pixmap, -nopixmap" .nr bi 1 .Pp If -pixmap is used gv tries to maintain off-screen regions of the displayed page by allocating a sufficiently large pixmap. If -nopixmap is used the X Server is responsible for maintaining obscured portions of the displayed page (see also the "useBackingPixmap" resource). .IP "-v " .nr bi 1 .Pp Print the version number of gv to standard output and exit. .IP "-h, -? " .nr bi 1 .Pp Display a short help message and exit. .IP "-help" .nr bi 1 .Pp Display a more explicit help message and exit. .IP "-scale <n>" .nr bi 1 .Pp Selects the scale entry <n> relative to the scale 1.0. <n> must be an integer. .IP "-scalebase <n>" .nr bi 1 .Pp Selects the scale base <n>. .IP "-monochrome, -grayscale, -color" .nr bi 1 .Pp Sets the color palette to be used. .IP "-media <media>" .nr bi 1 .Pp Selects the paper size to be used. Valid values are names of paper sizes that appear in the list of page medias as given by the medias resource. .IP "-page <label>" .nr bi 1 .Pp Display the page with label <label> first. .IP "-portrait, -landscape, -seascape, -upsidedown" .nr bi 1 .Pp Sets the orientation. .IP "-quiet, -noquiet" .nr bi 1 .Pp Whether to start ghostscript with the -dQUIET option. .IP "-resize, -noresize" .nr bi 1 .Pp Whether gv is allowed to automatically fit the size of its window to the size of the displayed page. .IP "-safer, -nosafer" .nr bi 1 .Pp Whether to start ghostscript with the -dSAFER option. .IP "-spartan" .nr bi 1 .Pp This is a shortcut for "-style gv_spartan.dat". .IP "-style <resource file>" .nr bi 1 .Pp Read and use additional resources from the file <resource file>. These resources have lower priority than those provided in the context of the -ad <resource file> option. .IP "-swap, -noswap" .nr bi 1 .Pp Whether to interchange the meaning of the orientations landscape and seascape. .IP "-watch, -nowatch" .nr bi 1 .Pp The -watch option causes gv to check the document periodically. If changes are detected gv will automatically display the newer version of the file. The document is by default checked once every second. This can be changed via the watchFileFrequency resource. Note that sending gv the SIGHUP signal also causes an update of the displayed document. This method may be used by document creators to trigger gv remotely. .if n(ll>1 .RE .nr ll -1 .SH Resources .Pp Resource files .Pp In general gv does not depend on any external resource files. However, when starting gv, preferences are read from .Pp .nr ll +1 .nr tn(ll 0 .if n(ll>1 .RS .nr bi 1 .Pp a system specific resource file. The name of this file is as described by the "XFILESEARCHPATH" environment variable, or, if this variable is not defined, implementation dependent. In most cases it is "/usr/X11/lib/X11/app-defaults/GV". Administrators may want to modify this file in order to set up gv according to the local needs of their system. .nr bi 1 .Pp a user specific resource file. The name of this file is either "~/.gv" or as described by the "XUSERFILESEARCHPATH" environment variable. .if n(ll>1 .RE .nr ll -1 .Pp The files "gv_user.ad" and "gv_system.ad" (located in the library directory of gv, which is most probably either "/usr/local/lib/gv/" or "/usr/lib/gv/" may serve as a basis for constructing the user and system specific resource files. .Pp Note that the user and system specific resource files are not the only sources of preferences taken into account when gv is started. However, in practice these are the most important. .Pp Resources of gv .Pp The following describes some of the resources of gv. The precise syntax of some of the resource values may be inferred from the appended default system specific resource file. .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "antialias" .nr bi 1 .Pp Whether antialiasing should be used. Valid values are "True" and "False". .IP "autoCenter" .nr bi 1 .Pp Whether the displayed page should automatically be centered (for instance when opening a new file). Valid values are "True" and "False". .IP "autoResize" .nr bi 1 .Pp Whether gv is allowed to resize the main window according to the size of the current page. Valid values are "True" and "False". .IP "confirmPrint" .nr bi 1 .Pp Whether printing requires an extra confirmation. Valid values are "True" and "False". .IP "confirmQuit" .nr bi 1 .Pp Whether leaving gv requires extra confirmation. Valid values are "0" (Never), "1" (When processing) and "2" (Always). The default value is "1", which causes a confirmation request when trying to leave gv in the presence of pending PDF to Postscript conversions. .IP "scrollingEyeGuide" .nr bi 1 .Pp If this resource is "True" scrolling via the keyboard causes a temporary border to be drawn around the previously visible area of the page. Allowed values are "True" and "False". .IP "ignoreEOF" .nr bi 1 .Pp Defines the behaviour of the postscript scanner as described in the Options section. Valid values are "True" and "False". .IP "respectDSC" .nr bi 1 .Pp Determines whether gv should attempt to respect document structuring comments. Valid values are "True" and "False". .IP "reverseScrolling" .nr bi 1 .Pp Defines the interpretation of directions when scrolling with the mouse. Valid values are "True" and "False". .IP "swapLandscape" .nr bi 1 .Pp Whether the meaning of "landscape" and "seacape" should be interchanged. Valid values are "True" and "False". .IP "scratchDir" .nr bi 1 .Pp Specifies a directory used to store temporary data. .IP "defaultSaveDir" .nr bi 1 .Pp Specifies the default destination directory for files to be saved. .IP "useBackingPixmap" .nr bi 1 .Pp If the value of this resource is "False" the X Server is advised that saving off-screen pixels of the displayed page would be beneficial (maintaining backing store). In this case gv does not actively maintain the contents of the page but relies on the X Server. The server is, however, always free to stop maintaining backing backing store. If the value of this resource is "True" the X Server is advised that maintaining backing store is not useful. In this case gv attempts to allocate a sufficiently large pixmap to store the contents of the displayed page. .IP "watchFile" .nr bi 1 .Pp Whether the document should be checked periodically and updated automatically if changes are detected. Valid values are "True" and "False". .IP "watchFileFrequency" .nr bi 1 .Pp Defines the time in milliseconds elapsing between successive checks of the document when watchFile is set to "True". Allowed values must be larger than 500. .IP "printCommand" .nr bi 1 .Pp The command used for printing a file. The command may contain multiple '%s' wildcards which will be replaced by the name of the file to be printed. .IP "gsInterpreter" .nr bi 1 .Pp The command used to start the ghostscript interpreter. .IP "gsCmdScanPDF" .nr bi 1 .Pp The command used to extract document structuring comments from a PDF file. .IP "gsCmdConvPDF" .nr bi 1 .Pp The command used to convert a PDF file to PostScript. .IP "gsX11Device" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device. .IP "gsX11AlphaDevice" .nr bi 1 .Pp The ghostscript command line option which activates the "X11" device with antialiasing enabled. .IP "gsSafer" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dSAFER" command line option. .IP "gsQuiet" .nr bi 1 .Pp Determines whether ghostscript should be started with the "-dQUIET" command line option. .IP "gsArguments" .nr bi 1 .Pp May be used to provide additional command line options for the ghostscript interpreter. Starting gv with the "-arguments <arguments>" option will override this resource setting. .IP "magMenu" .nr bi 1 .Pp Describes the menu that pops up when preparing to to zoom an area of the displayed page. .IP "dirs" .nr bi 1 .Pp Defines a list of directories accessible via the Directories menu in the file selection window. The special value "Home" corresponds to the users home directory, the value "Tmp" corresponds to the scratch directory as defined by the scratchDir resource. .IP "filter" .nr bi 1 .Pp Defines the default filter to be used when displaying a directory contents in the file selection window. A filter is specified according to the syntax .DS .sp .ft RR .nf <filter> := [<filespecs>] [no <filespecs>] <filespecs> := <filespec> [<filespecs>] <filespec> := filename possibly including wildcards '*' which match any character. .DE .fi .ec .ft P .sp Example: The filter .DS .sp .ft RR .nf GV*filter: *.ps *.pdf no .* .DE .fi .ec .ft P .sp screens out all files with names starting with a dot and keeps of the remaining ones only those which end on ".ps" or ".pdf". .IP "filters" .nr bi 1 .Pp Defines a list of filters offered in the Filters menu of the file selection window. The filter "None" has a special meaning causing all files to be displayed when the corresponding menu entry is selected. .IP "miscMenuEntries" .nr bi 1 .Pp Describes the menu that pops up when clicking with the third mouse button on the displayed page. The value of this resource is a list of menu entries. Allowed entries are "update", "redisplay", "toggle_current", "toggle_even", "toggle_odd", "unmark", "stop", "print_all", "print_marked", "save_all", "save_marked" and "line". .IP "showTitle" .nr bi 1 .Pp Whether the name of the displayed document should be shown in the title bar of the window. The name of gv's icon will also change accordingly if this resource is set to "True". .IP "maximumWidth, maximumHeight" .nr bi 1 .Pp When resizing gv will not attempt to exceed the size specified by these resources. These resources may be specified as a positive integer or as "screen", optionally combined with a positive or negative offset. The default values listed above provide examples for this syntax. "screen" will automatically be replaced by the size of the screen. .IP "minimumWidth, minimumHeight" .nr bi 1 .Pp Defines a minimum size for the main window. Valid values for both resources are positive integers larger than 200. .IP "scale" .nr bi 1 .Pp Sets the initial scale. The value of this resource is the offset of the scale to be selected relative to the scale 1.0 in the the "Scale" menu. .IP "scaleBase" .nr bi 1 .Pp Selects the initial scale base. The value of this resource should be a positive integer. .IP "scales" .nr bi 1 .Pp Defines the available scales bases and scales in the "Scale" menu. .IP "orientation" .nr bi 1 .Pp Sets the initial orientation. Valid values are "portrait", "landscape","seascape", "upside-down" and "automatic". "automatic" causes gv to attempt to derive the correct orientation from document structuring comments. .IP "fallbackOrientation" .nr bi 1 .Pp Defines the paper-size to be used when automatic orientation detection fails. Valid values are "portrait", "landscape","seascape" and "upside-down". .IP "medias" .nr bi 1 .Pp A list describing the page medias known to gv. List entries starting with "!" or "#" will not appear in the "Media" menu but will still be used for automatic paper size detection. .IP "pagemedia" .nr bi 1 .Pp Sets the paper size. Allowed values are as given in the above list of paper-sizes. Specifying "automatic" causes gv to attempt to derive the correct paper-size from document structuring comments. .IP "fallbackPageMedia" .nr bi 1 .Pp Defines the paper-size to be used when automatic paper-size detection fails. Valid values are as given in the above list of paper-sizes. .if n(ll>1 .RE .nr ll -1 .Pp The default user and system specific resource file .DS .sp .ft RR .nf GV.pageMedia: automatic GV.orientation: automatic GV.fallbackOrientation: portrait GV.swapLandscape: False GV.autoCenter: True GV.antialias: False GV.respectDSC: True GV.ignoreEOF: True GV.confirmPrint: True GV.reverseScrolling: False GV.scrollingEyeGuide: True GV.autoResize: True GV.maximumWidth: screen-20 GV.maximumHeight: screen-44 GV.minimumWidth: 400 GV.minimumHeight: 430 GV.confirmQuit: 1 GV.watchFile: False GV.watchFileFrequency: 1000 GV.showTitle: True GV.miscMenuEntries: redisplay \n\ # update \n\ stop \n\ line \n\ toggle_current \n\ toggle_even \n\ toggle_odd \n\ unmark \n\ line \n\ print_all \n\ print_marked \n\ save_all \n\ save_marked GV.scale: 0 GV.scaleBase: 1 GV.scales: Natural size, 1.000, screen \n\ Pixel based, 1.000, pixel \n\ 0.100, 0.100 \n\ 0.125, 0.125 \n\ 0.250, 0.250 \n\ 0.500, 0.500 \n\ 0.707, 0.707 \n\ 1.000, 1.000 \n\ 1.414, 1.414 \n\ 2.000, 2.000 \n\ 4.000, 4.000 \n\ 8.000, 8.000 \n\ 10.00, 10.00 GV.medias: Letter, 612 792 \n\ # LetterSmall, 612 792 \n\ Legal, 612 1008 \n\ Statement, 396 612 \n\ Tabloid, 792 1224 \n\ Ledger, 1224 792 \n\ Folio, 612 936 \n\ Quarto, 610 780 \n\ # 7x9, 504 648 \n\ # 9x11, 648 792 \n\ # 9x12, 648 864 \n\ # 10x13, 720 936 \n\ 10x14, 720 1008 \n\ Executive, 540 720 \n\ # A0, 2384 3370 \n\ # A1, 1684 2384 \n\ # A2, 1191 1684 \n\ A3, 842 1191 \n\ A4, 595 842 \n\ # A4Small, 595 842 \n\ A5, 420 595 \n\ # A6, 297 420 \n\ # A7, 210 297 \n\ # A8, 148 210 \n\ # A9, 105 148 \n\ # A10, 73 105 \n\ # B0, 2920 4127 \n\ # B1, 2064 2920 \n\ # B2, 1460 2064 \n\ # B3, 1032 1460 \n\ B4, 729 1032 \n\ B5, 516 729 \n\ # B6, 363 516 \n\ # B7, 258 363 \n\ # B8, 181 258 \n\ # B9, 127 181 \n\ # B10, 91 127 \n\ # ISOB0, 2835 4008 \n\ # ISOB1, 2004 2835 \n\ # ISOB2, 1417 2004 \n\ # ISOB3, 1001 1417 \n\ # ISOB4, 709 1001 \n\ # ISOB5, 499 709 \n\ # ISOB6, 354 499 \n\ # ISOB7, 249 354 \n\ # ISOB8, 176 249 \n\ # ISOB9, 125 176 \n\ # ISOB10, 88 125 \n\ # C0, 2599 3676 \n\ # C1, 1837 2599 \n\ # C2, 1298 1837 \n\ # C3, 918 1296 \n\ # C4, 649 918 \n\ # C5, 459 649 \n\ # C6, 323 459 \n\ # C7, 230 323 \n\ # DL, 312 624 GV.magMenu: 2, 2 \n\ 4, 4 \n\ 8, 8 \n\ 16, 16 \n\ 32, 32 \n\ 64, 64 GV*Ghostview.background: white GV*Ghostview.foreground: black GV.gsInterpreter: gs GV.gsCmdScanPDF: gs -dNODISPLAY -dQUIET -sPDFname=%s -sDSCname=%s pdf2dsc.ps -c quit GV.gsCmdConvPDF: gs -dNODISPLAY -dQUIET -dNOPAUSE -sPSFile=%s %s -c quit GV.gsX11Device: -sDEVICE=x11 GV.gsX11AlphaDevice: -dNOPLATFONTS -sDEVICE=x11alpha GV.gsSafer: True GV.gsQuiet: True GV.gsArguments: GV.uncompressCommand: gzip -d -c %s > %s GV.printCommand: lpr GV.scratchDir: ~/ GV.defaultSaveDir: ~/ GV.fallbackPageMedia: a4 GV.useBackingPixmap: True GV*dirs: Home\n\ Tmp\n\ /usr/doc\n\ /usr/local/doc GV*filter: no .* GV*filters: None\n\ *.*ps* *.pdf* no .*\n\ *.*ps* no .*\n\ *.pdf* no .*\n\ no .* .DE .fi .ec .ft P .sp .SH Mouse and key bindings .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "Mouse bindings in the Main and the Zoom window" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is either on the displayed page or on a zoomed area: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the displayed page 'proportionally'. .IP "- press button 3, move mouse, release button 3" .nr bi 1 .Pp Scrolls the displayed page 'absolutely'. .IP "- double-click with button 1" .nr bi 1 .Pp In the main window this displays the previous/next page if the double-click occured in the left/right half of the window. In a zoom window it does nothing. .IP "- press button 2, release button 2" .nr bi 1 .Pp Pops up a small menu which allows to choose a magnification for a certain area around the current mouse position. After selecting a magnification a zoom window pops up displaying the area at the chosen scale. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp This draws and thereby defines a rectangular region which can be displayed in a zoom window. The magnification for the area can be selected by means of a popup menu which appears after releasing button 2. .IP " - press button 1, press button 2" .nr bi 1 .Pp Redisplays the current page. This event sequence works only in the main window. .IP "- press button 3, release button 3" .nr bi 1 .Pp Pops up a small menu which offers a few standard actions like 'Redisplay', 'Mark Page', etc. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the File Selection popup" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window of either a file or a directory list: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls a file or directory list 'proportionally'. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Scrolls a file or directory list 'absolutely'. .IP "- press button 2, release button 2" .nr bi 1 .Pp Scrolls a file or directory list one page up/down if the button was pressed in the upper/lower half of the list. .IP "- double-click with button 1 on a filename" .nr bi 1 .Pp Selects the file and closes the File Selection popup. .IP "- click with button 1 on a directory name" .nr bi 1 .Pp Causes the contents of this directory to be displayed. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Table of Contents" .nr bi 1 .Pp The following mouse events are defined when the mouse pointer is in the window showing a list of page numbers of the current file (table of contents): .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse, release button 1" .nr bi 1 .Pp Scrolls the table of contents. .IP "- press button 1 on a page number" .nr bi 1 .Pp Go to this page. .IP "- press button 2 on a page number" .nr bi 1 .Pp Mark this page if it is unmarked, but unmark it if it is marked. .IP "- press button 2, move mouse, release button 2" .nr bi 1 .Pp Marks/unmarks all unmarked/marked pages in the region crossed by the mouse pointer during the movement. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the Panner widget" .nr bi 1 .Pp The Panner widget is the rectangular region located close to the left edge of the main window. It indicates the size and the position of the visible area of the current page relative to the total page. .Pp The following mouse events are defined when the mouse pointer is in this region: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1, move mouse" .nr bi 1 .Pp Scrolls the displayed page. .IP "- press button 2" .nr bi 1 .Pp Display the previous page. .IP "- press button 3" .nr bi 1 .Pp Display the next page. .if n(ll>1 .RE .nr ll -1 .IP "Mouse bindings in the ">>" and "<<" button windows" .nr bi 1 .Pp The ">>" and "<<" buttons are used to move to another page. The following mouse events are defined: .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "- press button 1" .nr bi 1 .Pp Move 1 page forward/backwards. .IP "- press button 2" .nr bi 1 .Pp Move 5 pages forward/backwards. .IP "- press button 3" .nr bi 1 .Pp Move 10 pages forward/backwards. .if n(ll>1 .RE .nr ll -1 .IP "Key Bindings" .nr bi 1 .Pp The following key events are defined in the main window. Those bindings scrolling the page are also defined in zoom popups. .DS .sp .ft RR .nf === Notation: s-X means press "Shift" and key "X" c-X means press "Ctrl" and key "X" sc-X means press "Shift" or "Ctrl" and key "X" === Miscellaneous keys: A Toggle antialiasing on and off O Open a new file Q Quit gv R Toggle gv's resizing behaviour I Respect/Ignore document structuring W Watch file / Don't watch file S Save the marked pages sc-S Save the current file P Print the marked pages sc-P Print the current file c-L Redisplay the current page . Redisplay the current page sc-. Reopen the current file M Mark the current page N Unmark the current page === Orientation: 7 Orientation portrait 8 Orientation landscape 9 Orientation upside-down 0 Orientation seascape === Magnification: sc-6 Select the scale entry -6 relative to the scale 1.0 sc-5 Select the scale entry -5 relative to the scale 1.0 sc-4 Select the scale entry -4 relative to the scale 1.0 sc-3 Select the scale entry -3 relative to the scale 1.0 sc-2 Select the scale entry -2 relative to the scale 1.0 sc-1 Select the scale entry -1 relative to the scale 1.0 ^ Select the scale 1.0 (for german keyboard layout) ` Select the scale 1.0 1 Select the scale entry 1 relative to the scale 1.0 2 Select the scale entry 2 relative to the scale 1.0 3 Select the scale entry 3 relative to the scale 1.0 4 Select the scale entry 4 relative to the scale 1.0 5 Select the scale entry 5 relative to the scale 1.0 6 Select the scale entry 6 relative to the scale 1.0 + Select the next scale entry = Select the next scale entry - Select the previous scale entry === Navigating: Arrow Scroll in the direction of the arrow s-Up Scroll columns up or jump -1 pages s-Down Scroll columns down or jump 1 pages s-Left Scroll rows left or jump -1 pages s-Right Scroll rows right or jump 1 pages c-Up Jump -1 pages (to top/left corner) c-Down Jump 1 pages (to top/left corner) c-Left Jump -5 pages (to top/left corner) c-Right Jump 5 pages (to top/left corner) D,X,Z,Y,C Identical to arrow up,down,left,left,right V Center the page sc-Space Scroll columns up or jump -1 pages Space Scroll columns down or jump 1 pages BackSpace Scroll columns up or jump -1 pages Insert Jump -5 pages Delete Jump 5 pages Home Go to the first page End Go to the last page Prior Jump -1 pages Next Jump 1 pages Keypad 0-9 Highlight a page number Keypad - Highlight previous page number Keypad + Highlight next page number Keypad Enter Jump to the highlighted page c-Enter Jump -1 pages s-Enter Jump -1 pages Enter Jump 1 pages B Jump -1 pages F Jump 1 pages .DE .fi .ec .ft P .sp .if n(ll>1 .RE .nr ll -1 .SH Comments about the user interface .Pp .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .Pp .IP "Scales" .nr bi 1 .Pp The "Scale" menu which allows to view the document at different sizes is divided into two parts. The first part shows a list of available scale bases, the second part, separated by a line, lists the relative scales which are applied with respect to the selected scale base. .Pp By default two scales bases are available, the "Natural size" and the "Pixel based" base. When choosing the "Pixel based" scale base a relative scale of 1.0 causes one postscript point to correspond to one pixel on the screen. .Pp When viewing a document at a relative scale of 1.0 using the "Natural size" base the page should appear in its real size, as if printed on paper. For the "Natural size" base to work properly gv has to know the correct size of the root window. Automatic detection of this size unfortunately only provides approximate results, therefore it is best if it is provided by the user. To do so the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp should be added to the "SCREEN_RESOURCES" property of the screen the document is viewed on, with <width> and <height> describing the width and height of the root window in units of millimeters. For instance by using the command .DS .sp .ft RR .nf echo "GV.screenSize: 396 x 291" | xrdb -override -screen .DE .fi .ec .ft P .sp a width of 346 mm and a height of 291 mm will be used for the "Natural size" scale base. Alternatively the resource .DS .sp .ft RR .nf GV.screenSize_<machine>_<disp>_<scr>: <width> x <height> .DE .fi .ec .ft P .sp may be added to a resource file read by gv. Here <machine> ,<disp> and ANGLED) describe the display on which gv displays the document. For instance, if the display is set to "tic.tac.toe.wo:0.1" the resource should be specified as .DS .sp .ft RR .nf GV.screenSize_tic_0_1: 396 x 291 .DE .fi .ec .ft P .sp Note that this method doesn't work on VMS. As a last alternative the resource .DS .sp .ft RR .nf GV.screenSize: <width> x <height> .DE .fi .ec .ft P .sp may be added to one of the resource files. However, for obvious reasons this method should be used only on single user machines. .Pp .IP "Scrolling" .nr bi 1 .Pp It is probably a de facto standard for user interfaces that windows are supposed to be scrolled by means of scrollbars attached to their sides. However, for various reasons the use of scrollbars has been minimized in gv. .Pp Instead, in all windows with obscured data, scrolling may be performed by pressing button1, moving the mouse, then releasing button1 directly in the window. This includes the displayed page, zoom popups, the table of contents and the file and directory lists displayed in the file selection popup. .Pp .IP "Displaying new versions of a document" .nr bi 1 .Pp During document creation it is usually desirable to always display the newest version of the document in work. .Pp Instead of explicitly loading it via the file selection popup the most recent version can be displayed by pressing the "Redisplay" button in the main window (VMS users should use the "Update File" entry in the "File" menu). Choosing the "Redisplay" entry in the menu that pops up when clicking with the third mouse button anywhere on the displayed page certainly has the same effect. .Pp More comfortable is the "Watch File" feature which may be switched on by selecting the corresponding entry in the "State" menu. If activated gv will check every now and then if a new version of the displayed file exists. If so it will be displayed automatically. By default the file is checked about once every second. .Pp Finally it may also be left to the document creating program to trigger gv to update its display. To do so the program should send the SIGHUP signal to gv. For instance at the end of a shell script generating a postscript file from latex sources the line .DS .sp .ft RR .nf kill -SIGHUP <gv_pid> .DE .fi .ec .ft P .sp may be added (here CR<gv_pid> is the process id of gv). Executing the script and thereby creating a new version of the document will then also cause the result to be displayed instantaneously. Please note that this feature is available only on X11 R6 based systems. .if n(ll>1 .RE .nr ll -1 .Pp .SH Availability .Pp The source code of the most recent version of gv may be obtained from the following sources: .nr ll +1 .nr tn(ll 2 .if n(ll>1 .RS .IP "World Wide Web:" .nr bi 1 .Pp http://wwwthep.physik.uni-mainz.de/~plass/gv/ .if n(ll>1 .RE .nr ll -1 .SH Authors .Pp .DS .sp .ft RR .nf Johannes Plass plass@thep.physik.uni-mainz.de Department of Physics Johannes Gutenberg University Mainz, Germany gv is derived from GhostView 1.5, created by Tim Theisen Systems Programmer Internet: tim@cs.wisc.edu Department of Computer Sciences UUCP: uwvax!tim University of Wisconsin-Madison Phone: (608)262-0438 1210 West Dayton Street FAX: (608)262-9777 Madison, WI 53706 .DE .fi .ec .ft P .sp .Pp .SH Suggestions and bug reports .Pp Please send suggestions or bug reports to ckesselh@debian.org. .Pp .Pp .Pp .Pp http://wwwthep.physik. uni-mainz.de/~ plass/gv/

Authors


Johannes Plass        
     plass@the
p.physik.uni-mainz.de
                      
     Departmen
t of Physics
                      
     Johannes 
Gutenberg University
                      
     Mainz, Ge
rmany
gv is derived from Gho
stView 1.5, cr
eated by
          Tim Theisen 
     Systems P
rogrammer
Internet: tim@cs.wisc.
edu  Departmen
t of Computer Sciences
    UUCP: uwvax!tim   
     Universit
y of Wisconsin-Madison
   Phone: (608)262-043
8    1210 West
 Dayton Street
     FAX: (608)262-977
7    Madison, 
WI   53706

Suggestions and bu g reports

Please send suggestion s or bug repor ts to ckesselh@debian.org.


Table of Contents