home *** CD-ROM | disk | FTP | other *** search
/ swCHIP 1991 January / swCHIP_95-1.bin / utility / gsview13 / src / gvc.doc < prev    next >
Text File  |  1995-12-09  |  67KB  |  1,763 lines

  1. 1Overview
  2. ?Overview
  3. W
  4.  `GSview for Windows` is a graphical interface for MS-Windows `Ghostscript`.
  5. P
  6.  `PM GSview` is a graphical interface for OS/2 `Ghostscript`.
  7. E
  8.  Ghostscript is an interpreter for the PostScript page description language
  9.  used by laser printers.
  10.  For documents following the Adobe PostScript Document Structuring
  11.  Conventions,
  12.  GSview allows selected pages to be viewed or printed.
  13. W
  14.  GSview should be used with Ghostscript 3.33 or later.
  15. P
  16.  GSview should be used with Ghostscript 3.33 or later.
  17. E
  18.  GSview was inspired by Tim Theisen's X11 Ghostview program.
  19. 2Installation
  20. ?Installation
  21. W
  22.  First you need to install Ghostscript.
  23.  It is recommended that Ghostscript 3.33 or later be used.
  24.  (If you wish to use 16-bit Ghostscript 2.6.1, see the 
  25.  `Ghostscript Version` topic.
  26.  If using the 32-bit versions of GSview or Ghostscript, you must use
  27.  Ghostscript 3.12 or later.)
  28. P
  29.  First you need to install Ghostscript 3.12 or later.
  30.  This version of GSview will not work with earlier versions of Ghostscript.
  31.  Ghostscript 3.33 or later is preferred.
  32. E
  33.  
  34.  Next install
  35. P
  36.  PM GSview by copying gvpm.exe and gvpm.hlp
  37. W
  38.  GSview for Windows by copying gsview.exe, gsview32.exe and gsview.hlp
  39. E
  40.  to your Ghostscript directory.
  41.  
  42.  Start GSview then select `Options` | `Ghostscript Command`,
  43.  and enter the correct executable path and include path for Ghostscript.
  44.  For example
  45. P
  46.    c:\gs\gsos2.exe -Ic:\gs;c:\psfonts
  47. W
  48.    c:\gs\gswin.exe -Ic:\gs;c:\gs\fonts
  49. E
  50.  
  51.  It is essential that you get both the executable and the include path
  52.  correct otherwise GSview will either complain that it cannot run
  53. P
  54.  gsos2,
  55. W
  56.  gswin,
  57. E
  58.  or it will start and then immediately exit with an
  59.  error code.
  60.  
  61. W
  62.  Under Windows 95 or NT, the 32 bit version of GSview (gsview32.exe)
  63.  requires the 32 bit version of Ghostscript (gswin32.exe), and
  64.  the 16 bit version of GSview (gsview.exe) requires the 16 bit
  65.  version of Ghostscript (gswin.exe).  Under Windows 95 or NT you
  66.  need a version of Ghostscript later than 3.12.
  67.  Under Windows 3.1 with Win32s, the 16 and 32 bit versions can
  68.  be intermixed.
  69.  
  70. E
  71.  Set the environment variable TEMP to point to a directory for
  72.  temporary files.  For example:
  73.    SET TEMP=c:\temp
  74.  The directory must exist and must be writeable.
  75.  
  76.  If you have some Type 1 fonts on your system, it may be possible to
  77.  tell Ghostscript to use them.  See `Fontmap.os2` and `Fontmap.atm`
  78.  supplied with Ghostscript for examples.  See the `Fonts` topic.
  79.  
  80.  If you have problems, try reading the help topic `Common Problems`.
  81.  
  82.  To uninstall GSview, remove the files you installed above, then remove
  83. P
  84.  c:\os2\gvpm.ini
  85. W
  86.  c:\windows\gsview.ini and c:\windows\gsview32.ini
  87. E
  88.  from the appropriate system directory.
  89. 3Ghostscript Installation
  90. ?Ghostscript Installation
  91.  The following describes how to install Ghostscript, not GSview.
  92.  The primary documentation on installing Ghostscript is found in
  93.  the Ghostscript file use.doc.
  94.  
  95.  Aladdin Ghostscript for the PC is available on the Internet from
  96.   ftp://ftp.cs.wisc.edu/ghost/aladdin/gsNNNxxx.zip
  97.  Where NNN is the version number.   
  98.  For Ghostscript 3.33, the files requires to run Ghostscript are:
  99.   gs333ini.zip
  100.  plus one or more of
  101.   gs333dos.zip   (MS-DOS 386 EXE)
  102.   gs333os2.zip   (OS/2 2.0 or later EXE)
  103.   gs333win.zip   (MS-Windows 3.1 16bit EXE)
  104.   gs333w32.zip   (MS-Windows 3.1/Win32s or MS-Windows 95 or NT EXE)
  105.  If you do not already have a set of Type 1 fonts, you will
  106.  also need
  107.   gs333fn1.zip
  108.  
  109.  The following assumes that Ghostscript is to be installed on
  110.  drive d:.
  111.  Unzip the INI zip file and the required EXE zip files from the
  112.  root directory.  This should put the files into the directory d:\gs3.33.
  113.  
  114.  If you also need the fonts, change to the d:\gs3.33 directory and
  115.  then unzip gs333fn1.zip.  This will put font files into .\fonts.
  116.  To run Ghostscript, set the GS_LIB environment variable as follows
  117.   SET GS_LIB=d:\gs3.33;d:\gs3.33\fonts
  118.  then start the appropriate EXE.  To run Ghostscript without using
  119.  the environment variable, use the following command
  120.   d:\gs3.33\gs -Id:\gs3.33;d:\gs3.33\fonts
  121.  where the EXE name needs to be replaced with the appropriate name
  122.  (gs, gs386, gswin, gswin32 or gsos2).
  123.  
  124.  If you already have some Type 1 fonts, there are two ways to tell
  125.  Ghostscript about these fonts: editing/replacing the `Fontmap` file,
  126.  or the `GS_FONTPATH` environment variable.  See the Ghostscript
  127.  use.doc and the sample Fontmap files for details.
  128.  
  129.  See the `Include Path` and `Fonts` topics for more details.
  130. P
  131. 3Portable Document Format
  132. ?Portable Document Format
  133. ?PDF
  134.  GSview can display PDF files, although there are a number of problems
  135.  with the current method.  To enable display of PDF files, copy the
  136.  file pdf2dsc.ps from the GSview src directory to the Ghostscript
  137.  lib directory.  When you open a PDF file, GSview will start up
  138.  Ghostscript and using pdf2dsc.ps will create a temporary DSC file which 
  139.  will contain commands to display pages of the PDF file.  GSview will
  140.  then start Ghostscript a second time to actually display the PDF file.
  141.  
  142.  Known problems with the current implemtentation are:
  143.  
  144.  - For long PDF files, GSview will take a long time to scan the PDF file.
  145.  Be patient.
  146.  
  147.  - Ghostscript is used twice to scan the PDF file,  which makes it take
  148.  even longer.  The GSview PDF code should eventually be rewritten to
  149.  avoid using the temporary DSC file so that only one pass is needed. 
  150.  
  151.  - Zoom doesn't work for PDF files.  Attempting to use it will probably
  152.  cause GSview to crash with an out of memory error.
  153.  
  154.  - Doesn't sense if PDF file has been changed during display.
  155. E
  156. 3Include Path
  157. ?Include Path
  158.  Ghostscript needs to read some initialisation files during startup,
  159.  and needs to read font files before drawing text.
  160.  When used on a PC with GSview, it is normal to tell Ghostscript where to
  161.  find these files using the Ghostscript `-I` command line switch.
  162.  Alternatively, the `GS_LIB` environment variable can be used.
  163.  See below for details for Unix or VMS.
  164.  
  165.  The `-I` switch or `GS_LIB` environment variable contains a list of 
  166.  directories to search for the required initialisation files.
  167.  On a PC, it is normal to put the initialisation files in the
  168.  same directory as the Ghostscript program.  If Ghostscript is in
  169.  c:\gs, then `-Ic:\gs` would be used as a command line option to
  170.  Ghostscript.
  171.  
  172.  Ghostscript also needs to find font files.  The list of fonts known to
  173.  Ghostscript is contained in the `Fontmap` file.  The directories which
  174.  contain these fonts should be added to the `-I` switch.
  175.  If the Ghostscript *.gsf fonts are in c:\gs\fonts, and some other
  176.  *.pfb fonts are in c:\psfonts, then `-Ic:\gs;c:\gs\fonts;c:\psfonts`
  177.  would be used as a command line option to Ghostscript on a PC.
  178.  
  179.  Under Unix or VMS with Ghostview, the include path should have been
  180.  configured when Ghostscript was compiled.
  181.  If not,  and Ghostview is being used, use the `GS_LIB` environment
  182.  variable instead of `-I`.
  183.  The Ghostscript include files are generally not put in the same
  184.  directory as the executable under Unix.  Instead the executable
  185.  might be in
  186.   /usr/local/bin
  187.  while the include files are in
  188.   /usr/local/lib/ghostscript/gs3.33
  189.  and the fonts in
  190.   /usr/local/lib/ghostscript/fonts
  191.  Consequently, the `GS_LIB` environment variable would need to
  192.  be set to
  193.   /usr/local/lib/ghostscript/gs3.33:/usr/local/lib/ghostscript/fonts
  194.  It is to be hoped that these were set as the default when Ghostscript
  195.  was compiled, and that it is unnecessary to use `GS_LIB`.
  196.  
  197.  For more information, see the following topic.
  198. 4File searching
  199. ?File searching
  200.  (from Ghostscript use.doc)
  201.  
  202.  When looking for the initialisation files (gs_*.ps), the files related to
  203.  fonts (Fontmap, *.pfa, *.pfb, *.gsf), or the file for the 'run' operator,
  204.  Ghostscript first checks whether
  205.  the file name specifies an explicit directory or drive (i.e., doesn't begin
  206.  with '/' on Unix systems; doesn't contain a ':' or begin with a '/' or '\'
  207.  on MS-DOS systems; doesn't contain a ':' or a square bracket on VMS
  208.  systems).  If it does, Ghostscript simply tries to open the file using the
  209.  given name.  Otherwise, Ghostscript will try directories in the following
  210.  order:
  211.  
  212.  1. The directory/ies specified by the -I switch(es) in the command
  213.  line (see below), if any;
  214.  
  215.  2. The directory/ies specified by the GS_LIB environment variable,
  216.  if any;
  217.  
  218.  3. The directory/ies specified by the GS_LIB_DEFAULT macro in the
  219.  Ghostscript makefile, if any.
  220.  
  221.  Each of these (GS_LIB_DEFAULT, GS_LIB, and -I parameter) may be either a
  222.  single directory, or a list of directories separated by a character
  223.  appropriate for the operating system (':' on Unix systems, ';' on VMS
  224.  systems, ';' on MS-DOS systems).
  225.  Ghostscript 3.12 use.doc states that:
  226.   Note that Ghostscript does *not* attempt to open the file
  227.   in the current directory.  This is consistent with common
  228.   practice on Unix, but it is different from the usual 
  229.   practice on MS-DOS.
  230.  This is incorrect.  Ghostscript does search in the current directory.
  231. 3Fonts
  232. ?Fonts
  233.  Ghostscript locates fonts in two ways:
  234.  
  235.  1. Those listed explicitly in `Fontmap`
  236.  
  237.  2. Font files found in directories listed in the `GS_FONTPATH` environment
  238.  variable.
  239.  
  240.  Those listed in the `Fontmap` file should be locatable on the Ghostscript
  241.  include path, or should have fully qualified paths.  Note that
  242.  you must use / or \\ and must not use \ within a directory name.
  243.  
  244.  Ghostscript comes with a number of free fonts, most with a .gsf
  245.  extension.  These are ordinary Type 1 fonts (although they cannot
  246.  be used with Adobe Type Manager).  The Ghostscript fonts can be
  247.  broken into three main classes:
  248.  
  249.  1. Type 1 outline fonts with hinting (most *.pfa).  These produce
  250.  good quality output.  The standard Fontmap file uses these in
  251.  preference to the other font types.  There are relatively few of
  252.  these fonts.
  253.  
  254.  2. Type 1 outline fonts that have been created from bitmap fonts
  255.  (p*.gsf, z*.gsf, etc.).  These produce poor quality output.
  256.  Avoid them if at all possible.
  257.  A full set of the common 35 PostScript fonts is available.
  258.  
  259.  3. Type 1 stroked fonts created from the public domain Hershey fonts
  260.  (h*.gsf, h*.pfa).  These produce moderate quality output, but do
  261.  not correspond to standard PostScript fonts.
  262.  
  263.  If you have some other Type 1 outline fonts (*.pfa, *.pfb), it is
  264.  possible to use these with Ghostscript.  Whether or not you are
  265.  allowed to do this depends on the font licence.  If you do use
  266.  these fonts with Ghostscript, it is `your` responsibility to make
  267.  sure that the font licence permits this use.
  268.  To use the other Type 1 fonts, you will need to replace or edit
  269.  the `Fontmap` file.  The reason for using these other Type 1 fonts
  270.  is that they are almost certainly of better quality than the Type 1
  271.  bitmap derived fonts supplied with Ghostscript.  However, good
  272.  quality fonts are not usually free.
  273. 4Fontmap
  274. ?Fontmap
  275.  The `Fontmap` file tells Ghostscript what fonts are available
  276.  and where to find them.
  277.  Each line in `Fontmap` may be one of the following:
  278.  
  279.  1. A comment.  These are lines that start with a %
  280.     % fontmap aka Fontmap - standard font catalog for Ghostscript.
  281.  
  282.  
  283.  2. A font name and file name.  For example
  284.     /Courier                (ncrr.pfa)      ;
  285.     /Courier-Italic         (ncrri.pfa)     ;
  286.  The first of these lines says that the font name `Courier` is to
  287.  be found in the file `ncrr.pfa`.
  288.  The file `ncrr.pfa` must contain a font named Courier.
  289.  If the name is not Courier then a font alias must be used.
  290.  This is described later.
  291.  Note that the file name is a PostScript string and so \ has a 
  292.  special meaning.  
  293.  If `ncrr.pfa` was in the c:\gs\fonts directory, you would need to 
  294.  have `c:\gs\fonts` as one of the directories listed in the include path, 
  295.  or you would need to use the file name (c:/gs/fonts/ncrr.pfa) or
  296.  (c:\\gs\\fonts\\ncrr.pfa).  Using / is preferred to \\.
  297.  
  298.  3. A font alias. For example
  299.     /Courier-Oblique                /Courier-Italic         ;
  300.  This tells Ghostscript that if Courier-Oblique is requested,
  301.  Courier-Italic is to be used instead.
  302.  The standard Fontmap file uses aliases to replace poor quality
  303.  bitmap-derived fonts with good quality hinted outline fonts.
  304.  Ghostscript has a bitmap derived version of the Helvetica font
  305.  in the file phvr.gsf.  The Fontmap file could instruct Ghostscript
  306.  to use this with the following line:
  307.     /Helvetica                      (phvr.gsf)      ;
  308.  However, the NimbusSansL-Regular font looks like Helvetica and is
  309.  a better quality font, so the default Fontmap file actually uses
  310.     /Helvetica                      /NimbusSansL-Regular    ;
  311.     /NimbusSansL-Regular            (n019003l.gsf)  ;
  312.  
  313.  A description of the required formatting for each line is near
  314.  the top of each `Fontmap` file.
  315.  
  316.  Ghostscript comes with a number of alternate `Fontmap` files.
  317.  These include
  318.   Fontmap        The standard fontmap file
  319.   Fontmap.ATB    For Adobe Type Basics (65 Type 1 fonts)
  320.   Fontmap.ATM    For Adobe Type Manager (13 fonts)
  321.   Fontmap.OS2    For Type 1 fonts shipped with OS/2 (13 fonts)
  322.   Fontmap.OSF    For DEC OSF/1 systems
  323.   Fontmap.Ult    For DEC Ultrix systems
  324.   Fontmap.VMS    For VAX/VMS systems with DECwindows/Motif
  325.  If you want to use one of the alternate Fontmap files, the procedure
  326.  is as follows:
  327.  
  328.  1. Copy Fontmap to Fontmap.old
  329.  
  330.  2. Copy Fontmap.??? (your selected Fontmap file) to Fontmap
  331.  
  332.  3. Add the directory that contains the Type 1 fonts to the
  333.  include path (`-I` or `GS_LIB`)
  334. 4GS_FONTPATH
  335. ?GS_FONTPATH
  336.  (From Ghostscript use.doc)
  337.  
  338.  When Ghostscript starts up, it also looks at the `GS_FONTPATH` environment
  339.  variable, which is also a list of directories.  It goes to those
  340.  directories and looks for all files that appear to contain PostScript
  341.  fonts; it then effectively adds all those files and fonts to its internal
  342.  copy of the Fontmap (the catalog of fonts and the files that contain
  343.  them).  If you are using one of the following types of computer, you may
  344.  wish to set `GS_FONTPATH` to the indicated value so that Ghostscript will
  345.  automatically acquire all the installed Type 1 fonts:
  346.  
  347.     System type             GS_FONTPATH
  348.     -----------             -----------
  349.     AIX                     /usr/lpp/DPS/fonts/outlines
  350.     NeXT                    /NextLibrary/Fonts/outline
  351.     OSF/1                   /usr/lib/X11/fonts/Type1Adobe
  352.     Silicon Graphics        /usr/lib/DPS/outline/base
  353.     Sun (Solaris 2.3)       /usr/openwin/lib/X11/fonts/Type1/outline
  354.     Ultrix                  /usr/lib/DPS/outline/decwin
  355.  
  356.  See also `Fontmap`.
  357. 4Platform Fonts
  358. ?Platform Fonts
  359.  Platform fonts are described in Ghostscript fonts.doc.
  360.  
  361.  The bitmap derived fonts used by Ghostscript are of poor quality.  
  362.  The computer hosting Ghostscript may have the same fonts in better 
  363.  quality versions, either as scalable fonts (e.g. Type 1 or TrueType) 
  364.  or as bitmaps.
  365.  To improve the display of documents, Ghostscript can use these
  366.  `platform fonts` instead of using the low quality fonts.
  367.  
  368.  This can be illustrated with an example.  The default /Helvetica-Bold
  369.  font is phvb.gsf, an outline font derived from a bitmap.  When the
  370.  /Helvetica-Bold font is requested, phvb.gsf is read.  When a character
  371.  is to be rendered to the display, Ghostscript instead asks MS-Windows
  372.  for the Helvetica-Bold font at the appropriate size.  MS-Windows then
  373.  draws the requested character from the TrueType Arial Bold font, and
  374.  Ghostscript puts it on the display.  The resulting output is of better
  375.  quality than the /Helvetica-Bold bitmap derived font.
  376.  
  377.  In another example, the same request for /Helvetica-Bold under 
  378.  Unix/X11 might instead display characters using a prebuilt bitmap
  379.  font if one is available in the requested size.
  380.  
  381.  There are some limitations to using `Platform fonts`.
  382.  
  383.  1. Platform fonts are only used for upright (Portrait) characters.  
  384.  Rotated characters will be displayed using the original PostScript font.
  385.  
  386.  2. A PostScript version of the required font must be available.
  387.  This is needed to obtain character bounding box information,
  388.  encoding vector for character sets, and drawing rotated characters.
  389.  
  390.  3. Platform fonts may only used for a limited range of sizes.
  391.  For example, MS-Windows only uses platform fonts for 6 to 36 point
  392.  fonts.
  393.  
  394.  4. MS-Windows lies about the available font sizes.  Ghostscript asks for
  395.  a particular font size and MS-Windows returns a font that it claims
  396.  is the same size.  However MS-Windows may instead return a font
  397.  of a different size that it thinks will look better.  Often it
  398.  looks worse because the intercharacter spacing is out of proportion
  399.  to the character size.  If this happens, platform fonts can be
  400.  disabled by adding -dNOPLATFONTS to the Ghostscript Command Line.
  401.  
  402.  5. Platform fonts will only be used for the display.  Output to
  403.  printer devices will continue to use the PostScript font.
  404.  
  405.  MS-Windows Ghostscript has a fixed alias table for fonts.
  406.  In the table below, the name on the left is the name of the 
  407.  PostScript font, and the name on the right is the name that
  408.  Ghostscript will try if MS-Windows doesn't know the PostScript 
  409.  name.
  410.   Courier         Courier New
  411.   Helvetica       Arial
  412.   Helvetica       Helv
  413.   Times           Times New Roman
  414.   Times           Tms Rmn
  415.  
  416.  Platform fonts are not supported under OS/2.
  417.  
  418.  Not yet written:
  419.  Unix/X11 Ghostscript may have an ability to use Xresources to
  420.  specify font aliases.  If this is the case, then the method should
  421.  be described here.
  422. 2Document Structuring Conventions
  423. ?Document Structuring Conventions
  424. ?DSC
  425. ?Encapsulated PostScript
  426. ?EPSF
  427. ?EPS
  428.  Adobe has defined a set of extended comment conventions that provide
  429.  additional information about the page structure and resource
  430.  requirements of a PostScript file.
  431.  If a file contains these Document Structuring Convention (DSC) comments,
  432.  GSview can display pages in random order using `Goto Page` and display pages
  433.  in reverse order using `Previous Page`.  Selected pages can be extracted to
  434.  another file or printed.
  435.  
  436.  If a file does not contain DSC comments, GSview can only
  437.  display the pages in the original order.
  438.  
  439.  DSC conforming files start with the comment line:
  440.   %!PS-Adobe-3.0
  441.  where the number 3.0 may change and is the DSC version number.
  442.  Some programs write PostScript files with a control-D as the first
  443.  character of the file, followed by the comment line mentioned above.
  444.  GSview will correctly report that these files are not DSC conforming,
  445.  but will still display them with page selection features available.
  446.  Complain to the author of the program that produced the PostScript file.
  447.  To make the file DSC conforming, edit it to remove the control-D character.
  448.  
  449.  DSC conforming files contain lines such as:
  450.   %%Pages: 24
  451.   %%Page: 1 1
  452.  These lines tell GSview how many pages a document contains and
  453.  where they start.  GSview uses this information to select
  454.  individual pages.
  455.  
  456.  Encapsulated PostScript Files (EPSF) are single page documents
  457.  that contain a subset of the `DSC` comments and PostScript commands.
  458.  EPS files start with the comment line:
  459.   %!PS-Adobe-3.0 EPSF-3.0
  460.  EPS files are commonly used for inclusion in other documents and
  461.  for this reason require the bounding box comment:
  462.    %%BoundingBox: llx lly urx ury
  463.  where llx, lly, urx and ury are integers giving the x and y coordinates
  464.  of the lower left and upper right corners of a bounding box which encloses
  465.  all marks made on the page.
  466.  
  467.  Some EPS files contain a preview of the PostScript document.
  468.  This preview can be a Windows Metafile, a TIFF file, or an Interchange
  469.  preview (EPSI format).
  470.  For the Windows Metafile or TIFF file preview, the EPS file under DOS
  471.  contains a binary header which specifies the location and lengths of
  472.  the preview and PostScript language sections of the EPS file.
  473.  For the Interchange format, the preview is contained in DSC comments
  474.  starting with
  475.   %%BeginPreview: width height depth lines
  476.  An EPS file with a preview can be created from an EPS file without a
  477.  preview using `Add EPS Preview`.
  478. 2Opening a Document
  479. ?File
  480. ?Open
  481. ?Select File
  482. ?Save As
  483. ?Extract
  484. ?Close
  485.  The `Open` command on the `File` menu opens a file and displays
  486.  the first page.
  487.  
  488.  If the file contains `DSC` comments, pages can be selected using
  489.  `Next Page`, `Previous Page` and `Goto Page`.
  490.  
  491.  If the file does not contain `DSC` comments, `Previous Page` and `Goto Page`
  492.  will not work.  Another file should not be selected until a last page of
  493.  the file has been displayed.
  494.  
  495.  When a file is open, GSview will display the document filename,
  496.  the current page (if available) and while the cursor is over
  497.  the image, the location of the cursor in coordinates specified
  498.  by `Options` | `Units`.  The coordinate can be PostScript points
  499.  (1/72"), millimetres or inches.
  500.  The cursor location is useful for calculating bounding boxes.
  501.  
  502.  The `Select File` command is similar to `Open` but it does not display
  503.  the document.
  504.  This command is useful for opening a document prior to printing it.
  505.  
  506.  The `Save As` command saves a copy of the current document.
  507.  This is useful if GSview is being used as a PostScript viewer by
  508.  another application and you wish to save the currently displayed file.
  509.  
  510.  `Extract` allows a range of pages to be copied from the current
  511.  document to a new document.  For example, ten pages can be extracted
  512.  from the middle of the current document and written to another file,
  513.  which will later be sent to a printer.
  514.  
  515.  The `Close` command closes the currently open document.
  516.  This should be used before the current file is changed by another
  517.  program.
  518.  If you do not do this and GSview detects that the file length or date
  519.  have changed, it will close Ghostscript and rescan the document.
  520.  
  521.  See also `Print`.
  522. 3PS to EPS
  523. ?PS to EPS
  524.  In general, it is not possible to convert a PostScript file to `EPS`.
  525.  However, many single page PostScript files can be converted to `EPS`
  526.  by changing the first line of the file to
  527.   %!PS-Adobe-3.0 EPSF-3.0
  528.  and then adding or fixing up the `%%BoundingBox` comment.
  529.  
  530.  `When used incorrectly, the PS to EPS command can produce PostScript
  531.  files with incorrect DSC comments.  Such a document will cause problems
  532.  when you try to include it inside another document.`
  533.  
  534.  To convert a PostScript file to `EPS`, the original file `must` be
  535.  a `single page` document.  If the document contains `DSC` comments
  536.  and is multi page, extract the desired page with `File` | `Extract`.
  537.  If the document does not contain `DSC` comments, you will need to
  538.  edit the file by hand to extract the desired page.
  539.  
  540.  `EPS` documents `must not` use any of the following operators:
  541.   banddevice   clear         cleardictstack  copypage
  542.   erasepage    exitserver    framedevice     grestoreall
  543.   initclip     initgraphics  initmatrix      quit
  544.   renderbands  setglobal     setpagedevice   setpageparams
  545.   setshared    startjob      letter          note
  546.   legal        a3            a4              a5
  547.  
  548.  The following operators should be used with care:
  549.   nulldevice   setgstate     sethalftone    setmatrix
  550.   setscreen    settransfer   setcolortransfer
  551.  
  552.  It is `your` responsibility to make sure that the above requirements
  553.  are met.
  554.  
  555.  To test if a document contains any of the above operators, select
  556.  `Options` | `EPS Warn` and then `Open` the desired document.
  557.  After the page has been displayed, look in the Ghostscript text window.
  558.  If any of the above operators have been used you should see lines like:
  559.   Warning: EPS files must not use ...
  560.  If you find these warnings then do `not` use `PS to EPS`.
  561.  Remember to turn off `EPS Warn` afterwards.
  562.  
  563.  A document must be displayed before `PS to EPS` is used.
  564.  The document must contain a `showpage`.
  565.  This is required so that the bounding box can be measured.
  566.  
  567.  For documents without `DSC` comments, `PS to EPS` allows a bounding
  568.  box to be specified, then writes out an `EPS` file consisting of
  569.  an `EPS` wrapper around the original document.
  570.  
  571.  For documents with `DSC` comments, `PS to EPS` will change the
  572.  first line of the file to
  573.   %!PS-Adobe-3.0 EPSF-3.0
  574.  then allows the `%%BoundingBox` comment to be changed or added.
  575.  
  576.  For `EPS` documents, `PS to EPS` allows the `%%BoundingBox` comment to
  577.  be changed.
  578.  
  579.  `PS to EPS` does not clip the document to the `%%BoundingBox`.
  580.  To do so would require changing the PostScript code itself.
  581.  `PS to EPS` only changes the `DSC` comments.
  582.  
  583.  `PS to EPS` does not add a preview to a document.
  584.  If you want a preview you add it with `Edit` | `Add EPS Preview` after
  585.  first creating an `EPS` file with a correct `%%BoundingBox`.
  586.  
  587.  See also `Add EPS Preview`, `Extract`, `EPS Warn`.
  588. 2Page Selection
  589. ?Page Selection
  590. ?Next Page
  591. ?Previous Page
  592. ?Redisplay
  593. ?Goto Page
  594. ?View
  595.  `View` | `Next Page` or the `+` button moves to the next page of a 
  596.  document.
  597.  This works even if the document does not contain `DSC` comments.
  598.  
  599.  `View` | `Previous Page` or the `-` button moves to the previous page.
  600.  
  601.  `View` | `Redisplay` redisplays the current page.
  602.  
  603.  `View` | `Goto Page` or the `pointing hand` button shows a dialog box 
  604.  which allows selection of the next page number to display.  
  605.  The `Select Page` dialog box shows page labels since these are likely 
  606.  to be more useful than a sequential page number.
  607.  
  608.  The `Previous Page`, `Redisplay` and `Goto Page` commands work only if the
  609.  document contains `DSC` comments.
  610. 2Zoom
  611. ?Zoom
  612.  To enlarge a displayed feature, position the cross-hair mouse pointer
  613.  over the feature then press the right mouse button.
  614.  The window will swap from normal display resolution to zoom
  615.  resolution and the status line will have the word `Zoomed` appended to it.
  616.  The zoomed feature will be in the centre of the window.
  617.  To cancel `Zoom`, press the right mouse button again or select
  618.  any command that redraws the page (e.g. `Redisplay`, `Next Page`).
  619.  By default the zoom resolution is 300 dots per inch but this can
  620.  be changed with the `Media` | `Zoom Resolution` command.
  621.  
  622.  `Zoom` will only work for `DSC` conforming documents.
  623. 2Document Information
  624. ?Info
  625.  A brief information area at the top of the window is used by
  626.  GSview to display the document filename, the current page number
  627.  and label (if available) and while the cursor is over the image, the
  628.  location of the cursor in coordinates specified by `Options` | `Units`.
  629.  The cursor location is useful for calculating bounding boxes.
  630.  
  631.  The `Info` command on the `File `menu shows a dialog box with the
  632.  following information about the `DSC` comments in the current document.
  633.  
  634.  `File `is the full pathname to the document.
  635.  
  636.  `Type` is` DSC`,` EPS`, `No DSC comments` or 'Ignoring DSC Comments'.
  637.  `EPS` is an Encapsulated PostScript File - a single page document
  638.  that contains a subset of the `DSC` comments and PostScript commands.
  639.  `EPS `files are commonly used for inclusion in other documents.
  640.  `Ignoring DSC Comments` is displayed if `Options` | `Ignore DSC`
  641.  is selected.
  642.  
  643.  `Title` is a text title that can be used when printing banner
  644.  pages and for routing or recognising documents.
  645.  
  646.  `Date` is the time the document was created.
  647.  
  648.  `BoundingBox` specifies a box that encloses all the marks painted
  649.  on the page.  The four integer values are the coordinates of the
  650.  lower left and upper right corners of the bounding box in default
  651.  user coordinates (1/72 inch).
  652.  
  653.  `Orientation `is either `Portrait `or` Landscape`.
  654.  
  655.  `Default Media` gives the media name followed by the width and
  656.  height of that media in default user coordinates (1/72 inch).
  657.  
  658.  `Page Order` is either `Ascending`, `Descending` or `Special`
  659.  
  660.  `Pages` is the total number of pages in the document.
  661.  
  662.  `Page` gives the page label and page number.
  663.  
  664.  `Bitmap `is the size of the display bitmap in pixels which may be
  665.  useful if you are copying the displayed image to the clipboard.
  666. 2Printing
  667. ?Print
  668. ?Print To File
  669. ?Print File
  670.  The `Print` command on the `File `menu allows printing of the document
  671.  using Ghostscript.
  672.  The Ghostscript printer driver and resolution are selected using the
  673.  `Select Device` dialog box.   Pages are selected using the `Select Pages`
  674.  dialog box.  The `All`, `Odd` and `Even` buttons provide quick selection
  675.  of pages.
  676.  
  677. W
  678.  The `mswinprn` printer driver uses the windows printer drivers
  679.  and should work with any printer with raster capabilities.
  680.  Printer resolution cannot be selected from within GSview; use
  681.  the Control Panel instead.  This driver is very slow and should
  682.  be considered a last resort if no other Ghostscript printer
  683.  driver is available.
  684.  
  685.  With all other printer drivers, Ghostscript sends the output direct
  686.  to the printer, without passing through a Windows printer driver.
  687.  If you have trouble printing you may have to `Print To File`
  688.  and then `Print File` or use the DOS command `COPY /B FILENAME PRN`.
  689.  
  690.  The Win32 versions of GSview and Ghostscript can't send output
  691.  directly to a printer port so an attempt is made to pass the output
  692.  unchanged through a Windows printer driver.  This does not work
  693.  with some Windows printer drivers.  Use 'Print To File' if you
  694.  have problems.
  695. E
  696.  
  697.  This list of available devices and resolutions is stored in the
  698.  [Devices] section of
  699. W
  700.  gsview.ini (or gsview32.ini for gsview32.exe).
  701. P
  702.  gvpm.ini.
  703. E
  704.  The default list of devices and resolutions is taken from the
  705.  standard distribution version of Ghostscript 3.33 and may not
  706.  be complete.
  707.  
  708.  To print a document without displaying it, open the document
  709.  using `Select File`.
  710.  
  711.  `Print To File` is similar to the `Print` command except that Ghostscript
  712.  will write the output to a file instead of sending it to a printer.
  713.  
  714.  If you want to produce a bitmap, some useful drivers are
  715.  `bmpmono`, `bmp16`, `bmp16m` and `bmp256`.
  716.  
  717.  `Print File` sends a file to a local port, bypassing the
  718. W
  719.  Windows
  720. P
  721.  Presentation Manager
  722. E
  723.  printer drivers.
  724.  This is useful for sending a document to a PostScript printer,
  725.  or for sending an output file produced by Ghostscript to a printer.
  726. 3Properties
  727. ?Properties
  728.  Some printer drivers allow extra properties to be specified.
  729.  If two sections are added to the
  730. W
  731.  gsview.ini (or gsview32.ini for gsview32.exe)
  732. P
  733.  gvpm.ini
  734. E
  735.  file for these printer
  736.  drivers, GSview will enable the `Properties` button which will
  737.  display the `Edit Properties` dialog box.
  738.  The following example shows how to add property information
  739.  for the cdjcolor driver.
  740.  First add a section which gives the current values.
  741.  This section, after the first character is removed, gives the options
  742.  that will appear in the `Property` list box.
  743.  The first character is `s` for string or `d` for number.
  744.   [cdjcolor]
  745.   dBitsPerPixel=24
  746.   dDepletion=1
  747.   dShingling=2
  748.   dBlackCorrect=4
  749.  
  750.  Next add a section which gives the values to display in the
  751.  `Value` list box.
  752.   [cdjcolor values]
  753.   dBitsPerPixel=1,3,8,16,24
  754.   dDepletion=1,2,3
  755.   dShingling=0,1,2
  756.   dBlackCorrect=0,1,2,3,4,5,6,7,8,9
  757.  GSview will also add the value `[Not defined]` to the listbox.
  758.  
  759.  When you press the `OK` button in the `Edit Properties` dialog
  760.  box, the current settings are written to the
  761. W
  762.  gsview.ini (or gsview32.ini for gsview32.exe)
  763. P
  764.  gvpm.ini
  765. E
  766.  file.
  767.  
  768.  When GSview prints a file, it will give Ghostscript the contents
  769.  of the [cdjcolor] section of
  770. W
  771.  gsview.ini (or gsview32.ini for gsview32.exe)
  772. P
  773.  gvpm.ini
  774. E
  775.  as follows:
  776.   -dBitsPerPixel=24 -dDepletion=1 -dShingling=2 -dBlackCorrect=3
  777.  If the value of a property is `[Not defined]`, that property will
  778.  not be sent to Ghostscript.
  779.  
  780.  Some entries for the cdj family of drivers are supplied in the
  781.  property.ini file that comes with GSview.
  782. 2Text Extract and Find
  783. ?Text Extract and Find
  784. ?Text
  785. ?Text Extract
  786. ?Search
  787. ?Find
  788. ?Find Next
  789.  In general, extracting text from a PostScript document is not a
  790.  trivial operation.  Words may be broken.  Text may be encoded.
  791.  Ligatures may be used (e.g replacing 'fi' with a single character).
  792.  There may be no relationship between the location of a word in
  793.  the PostScript file and its location on the page.
  794.  
  795.  However, it is common for PostScript documents to contain text in the
  796.  same order as it appears on the page, and for it to be given in
  797.  PostScript strings, surrounded by parentheses.  Complete lines
  798.  may be given in one string, or one word per string.  For this sort
  799.  of document, extracting text can be done with reasonable success.
  800.  
  801.  `Edit` | `Text Extract` will extract text contained in strings from
  802.  specified pages and write it to a text file.
  803.  Line breaks in this text file correspond to lines in the document.
  804.  Spaces in the text file correspond to spaces within strings, or to
  805.  separate strings.  A more effective method of extracting text is to
  806.  use ps2ascii.ps supplied with Ghostscript.
  807.  
  808.  `Edit` | `Find` will search for text and display the first
  809.  page that contains the text.  `Find` asks for a search text
  810.  and a range of pages in which to search.
  811.  The preceeding comments about extracting text from a PostScript
  812.  document should be noted.  `Find` first extracts text from
  813.  the document, then searches it ignoring all spaces in both the
  814.  document and the search text.  Case is ignored when searching.
  815.  Consequently the search text `these` would match both `These`
  816.  and `The serial`.  No information is given about where the word
  817.  is located on a given page because this information is not
  818.  available without a complete PostScript interpreter.
  819.  
  820.  `Edit` | `Find Next` will continue the search from the next page.
  821. 2Clipboard
  822. ?Clipboard
  823. ?Edit
  824. ?Copy
  825. ?Paste To
  826. ?Convert Bitmap
  827. ?Bitmap
  828. ?Add EPS Preview
  829. ?Extract EPS
  830.  The GSview window can be copied to the Clipboard as a bitmap
  831.  by selecting `Copy` from the `Edit` menu.
  832. W
  833.  The bitmap may be a Device Independent Bitmap or it may be a Device
  834.  Dependent Bitmap, depending on how Ghostscript was compiled.
  835.  The default for Ghostscript 3.33 is a Device Independent Bitmap
  836.  (BMP format).
  837. E
  838.  
  839.  An alternative way to get a bitmap output from Ghostscript is
  840.  to use one of the BMP drivers.  See `Print`.
  841.  
  842. W
  843.  `Paste To` copies a Device Independent Bitmap from the Clipboard
  844.  (if available) to a BMP file.
  845.  
  846.  `Convert Bitmap` converts between a Device Independent Bitmap and
  847.  a Device Dependent Bitmap.
  848.  If the clipboard contains a Device Independent Bitmap (BMP format),
  849.  this is converted to a Device Dependent Bitmap and added to the clipboard.
  850.  If the clipboard does not contain a colour palette, one is created
  851.  from the Device Independent Bitmap and added to the clipboard.
  852.  This option is present because some applications (notably Windows
  853.  Paintbrush) won't recognise a Device Independent Bitmap in the clipboard.
  854. P
  855.  `Paste To` copies the currently displayed image (if available)
  856.  to a BMP file.
  857. E
  858.  
  859.  `Add EPS Preview` takes a bitmap from the
  860. W
  861.  clipboard
  862. P
  863.  display
  864. E
  865.  and uses it to add a preview to an EPS file.
  866.  `Add EPS Preview` can create a DOS EPS file with a
  867. W
  868.  Windows Metafile or
  869. E
  870.  TIFF preview, or an EPSI file with an Interchange preview.
  871.  To use the `Add EPS Preview` command the following steps must be followed.
  872.  
  873.  1. Make sure the document has a correct bounding box.
  874.  A bounding box can be added or changed using `File` | `PS to EPS`.
  875.  
  876.  2. Select `Orientation` | `Portrait`.
  877.  
  878.  3. Select `Options` | `EPS Clip`.
  879.  This will cause Ghostscript to use a display window the size of the
  880.  bounding box instead of the page size.
  881.  
  882.  4. Select `Media` | `Resolution` and set a suitable resolution
  883.  for the preview.  If the resolution is too high
  884. W
  885.  the bitmap may not fit in the clipboard, or will
  886. P
  887.  it
  888. E
  889.  make the EPS file excessively large.
  890.  
  891.  5. `Open` an EPS file that does not contain a preview.
  892.  
  893. W
  894.  6. Select `Edit` | `Copy`.  This tells Ghostscript to copy the
  895.  display bitmap to the Clipboard.  This allows GSview to access
  896.  the bitmap in the next step.
  897.  
  898.  7.
  899. P
  900.  6.
  901. E
  902.  Select `Edit` | `Add EPS Preview`, then the preview format,
  903.  then the new EPS filename.  GSview will write a new file containing
  904.  the original PostScript EPS file and a preview created from the
  905. W
  906.  bitmap in the clipboard.
  907. P
  908.  display bitmap.
  909. E
  910.  The available preview formats are `Interchange`,
  911. W
  912.  `TIFF 4`, `TIFF 5` and `Windows Metafile`.
  913. P
  914.  `TIFF 4` and `TIFF 5`.
  915. E
  916.  If adding an Interchange preview, the document must have an `%%EndComments`
  917.  line, otherwise GSview may put the preview in the wrong place.
  918.  A TIFF 5 preview is a Class B image with no compression as described
  919.  in Appendix G of the TIFF 5.0 memorandum.  A TIFF 4 preview is almost
  920.  identical to the TIFF 5 preview, but avoids using tags which are not
  921.  described in the TIFF 4 specifiation.
  922.  WordPerfect 5.1 requires a TIFF 4 preview.
  923.  
  924. W
  925.  8.
  926. P
  927.  7.
  928. E
  929.  Reset `Orientation` | `Portrait`, `Options` | `EPS Clip`
  930.  and `Media` | `Resolution` to their previous values.
  931.  
  932.  To extract the PostScript or Preview section from a DOS EPS
  933.  file, use `File` | `Select File` followed by `Edit` | `Extract EPS`
  934.  then `PostScript` or `Preview`.
  935.  
  936.  See also `PS to EPS`.
  937. 2Options
  938. ?Options
  939.  The `Options` menu has the following selections:
  940. 3Ghostscript Command
  941. ?Ghostscript Command
  942.  The `Ghostscript Command` option allows selection of the command
  943.  to use when executing Ghostscript.
  944.  A default will be constructed using the GSview path and
  945.  will look like:
  946. W
  947.   gswin -Ic:\gs;c:\gs\fonts
  948. P
  949.   gsos2.exe -Ic:\gs;c:\gs\fonts;c:\psfonts
  950. E
  951.  GSview will first attempt to find Ghostscript in the GSview
  952.  directory and then will try the PATH.
  953.  If GSview still cannot find Ghostscript, use this option to
  954.  set the full pathname to Ghostscript.
  955.  If you wish to specify that Ghostscript should look for its
  956.  initialisation files in a different place, modify the -I option.
  957. W
  958.  Try to keep the command length short, otherwise GSview will
  959.  have trouble printing files with Ghostscript.
  960. E
  961.  Only the Ghostscript EXE and include path may be specified -
  962.  other items will confuse GSview.
  963. W
  964. 3Ghostscript Version
  965. ?Ghostscript Version
  966.  GSview is best used with Ghostscript version 3.12 or later,
  967.  preferably version 3.33 or later.
  968.  The 16-bit version of GSview can be used with the 16-bit
  969.  Ghostscript 2.6.1 by setting this option to `Ghostscript 2.6.1`.
  970.  
  971.  The default is `Ghostscript 3.12 or later`.
  972.  
  973.  The `Ghostscript Version` option is not available from 32-bit
  974.  GSview.
  975.  
  976.  See `Common Problems` for a description of what happens if you
  977.  set the `Ghostscript Version` to the wrong setting.
  978. E
  979. 3Sounds
  980. ?Sounds
  981.  The `Sounds` option assigns sounds to various events.
  982.  For each event the sound can be set to `None`, a `Speaker Beep` or
  983.  a `Wave` file.
  984.  
  985.  You must have a sound driver loaded before using Wave files.
  986.  Wave file sounds are not available under MS-Windows 3.0.
  987.  
  988.  The events are:
  989.  
  990.  `Output Page`: the PostScript showpage operator was executed.
  991.  
  992.  `No Page`: an invalid page was selected.
  993.  For example, pressing `Prev` while on the first page of a document
  994.  with `DSC` comments.
  995.  
  996.  `No Number`: a command required page numbering and the document did
  997.  not have page numbering.
  998.  For example, pressing `Goto Page` when viewing a document without
  999.  `DSC` comments.
  1000.  
  1001.  `Not Open`:  a command required a document to be open and this was
  1002.  not the case.
  1003.  For example, pressing `Goto Page` when no document is open.
  1004.  
  1005.  `Error`: many types of errors.
  1006.  
  1007.  `Timeout`: no response from Ghostscript within a timeout period.
  1008.  For example, display snowflak.ps on a PC with a 286-12 CPU.
  1009.  
  1010.  `Start`: GSview opened.
  1011.  
  1012.  `Exit`: GSview closed.
  1013.  
  1014.  The defaults are for `No Page` and `Error` to be a `Speaker Beep`
  1015.  and all other events to be `None`.
  1016. 3Units
  1017. ?Units
  1018.  The `Units` option sets the units used to display the cursor location
  1019.  on the status bar.  Available units are PostScript points (`pt` = 1/72"),
  1020.  millimetres (`mm`) and inches (`in`).
  1021.  The default is `pt`.
  1022. 3Save Settings
  1023. ?Save Settings
  1024. ?Save Settings Now
  1025. ?Save Settings on Exit
  1026. ?Settings
  1027. ?INI file
  1028.  The `Save Settings Now` option saves the GSview window position,
  1029.  window size, last used printer, last directory,
  1030.  `Sounds`, `Units`, `Save Last Directory`,
  1031.  `User Defined`, `Ghostscript Command`, `Button Bar`,
  1032. P
  1033.  `Fit Window To Page`,
  1034. E
  1035.  `Quick Open`, `Auto Redisplay`, `EPS Clip`, `EPS Warn`, `Ignore DSC`,
  1036. P
  1037.  `Show Bounding Box`,
  1038. E
  1039.  `Depth`, `Orientation`, `Media`, `Resolution` 
  1040.  and `Zoom Resolution` options to the initialisation file
  1041. W
  1042.  gsview.ini (or gsview32.ini for gsview32.exe) in the Windows system 
  1043.  directory.
  1044. P
  1045.  gvpm.ini in the OS/2 system directory.
  1046. E
  1047.  GSview reads this file during startup.
  1048.  
  1049.  When the `Save Settings on Exit` option is checked, GSview will
  1050.  automatically save the above settings when you quit GSview.
  1051. 3Safer
  1052. ?Safer
  1053.  When the `Safer` option is `checked`, GSview will give Ghostscript
  1054.  the `-dSAFER` flag, which disables the deletefile and renamefile operators,
  1055.  and the ability to open files in any mode other than read-only.
  1056.  This is the default.
  1057.  
  1058.  When the `Safer` option is `unchecked` Ghostscript can change
  1059.  files.
  1060. 3Save Last Directory
  1061. ?Save Last Directory
  1062.  When the `Save Last Directory` option is `checked`, GSview will
  1063.  save the current directory when you quit GSview.  When GSview
  1064.  is started next, this will be made the current directory.
  1065.  This is the default.
  1066.  
  1067.  When `Save Last Directory` option is `unchecked`, the current
  1068.  directory when GSview is started will be the directory where
  1069.  GSview is located, or the working directory specified by
  1070.  the Program Manager.
  1071. 3Button Bar
  1072. ?Button Bar
  1073. ?Magnify
  1074.  When the `Button Bar` option is `checked`, GSview will display
  1075.  a Button Bar down the left side of the window.  This is the default.
  1076.  The Button Bar contains the following items in order from top to
  1077.  bottom:
  1078.  
  1079.  `File` | `Open`
  1080.  
  1081.  `File` | `Print`
  1082.  
  1083.  `File` | `Info`
  1084.  
  1085.  `Help` | `Contents`
  1086.  
  1087.  `View` | `Goto Page`
  1088.  
  1089.  `View` | `Next Page`
  1090.  
  1091.  `View` | `Previous Page`
  1092.  
  1093.  `Go forward 5 pages`
  1094.  
  1095.  `Go back 5 pages`
  1096.  
  1097.  `Increase resolution by 1.2`
  1098.  
  1099.  `Decrease resolution by 1/1.2`
  1100.  
  1101.  `Edit` | `Find`
  1102.  
  1103.  `Edit` | `Find Next`
  1104.  
  1105.  If using the increase/decrease resolution buttons, `Auto Redisplay`
  1106.  should be set.  Instead of using these buttons, it is also possible
  1107.  to use the `Media` | `Resolution` command.
  1108.  When the `Button Bar` option is `unchecked`, GSview will not
  1109.  display the Button Bar.
  1110. P
  1111. 3Fit Window To Page
  1112. ?Fit Window To Page
  1113.  When the `Fit Window To Page` option is `checked`, GSview will
  1114.  shrink the window size so that it is no larger than the page
  1115.  being displayed.  This is the default.
  1116.  
  1117.  If `Fit Window To Page` is `unchecked`, GSview will not resize the
  1118.  window and areas outside the page will be drawn in light grey.
  1119.  This is useful if you do not wish the window to shrink when looking
  1120.  at pages at low resolution.
  1121. E
  1122. 3Quick Open
  1123. ?Quick Open
  1124.  When the `Quick Open` option is `checked`, GSview will not reload
  1125.  Ghostscript before every document, making opening of documents quicker.
  1126.  
  1127.  GSview tries to preserve the Ghostscript state between documents,
  1128.  but a document may still leave the Ghostscript interpreter in an unusual
  1129.  state or cause an error.  If an error occurs, Ghostscript will close.
  1130.  Error messages are displayed in the Ghostscript window.
  1131.  Select `Redisplay` to reopen the document.
  1132.  
  1133.  If `Quick Open` is `unchecked`, GSview will close Ghostscript and
  1134.  restart it before each new document or whenever the page orientation,
  1135.  resolution or size is changed.
  1136. 3Auto Redisplay
  1137. ?Auto Redisplay
  1138.  When the `Auto Redisplay` option is `checked`, GSview will
  1139.  redisplay `DSC` documents when the `Orientation`, `Resolution`,
  1140.  `Depth` or `Media` are changed.
  1141.  This is the default.
  1142.  
  1143.  If `Auto Redisplay` is `unchecked`, the `View` | `Redisplay` command
  1144.  must be used to redisplay a document after changing the
  1145.  `Orientation`, `Resolution`, `Depth` or `Media`.
  1146. 3EPS Clip
  1147. ?EPS Clip
  1148.  When the `EPS Clip` option is `checked`, GSview will clip the
  1149.  display bitmap to the bounding box of an EPS file instead of using the
  1150.  page size specified on the `Media` menu.  This is useful when
  1151.  adding a bitmap preview to an EPS file.
  1152.  
  1153.  If `EPS Clip` is `unchecked`, GSview will use the page size
  1154.  specified on the `Media` menu for EPS files.  This is the default.
  1155.  
  1156.  `EPS Clip` does not alter the original document, it only affects
  1157.  how much of the document is displayed by GSview.
  1158.  `EPS Clip` will only work in Portrait orientation.
  1159.  
  1160.  See also `Clipboard` | `Add EPS Preview`
  1161. 3EPS Warn
  1162. ?EPS Warn
  1163.  When the `EPS Warn` option is `checked`, GSview will write a
  1164.  prolog to Ghostscript when each file is opened.  This prolog will
  1165.  produce warning messages in the Ghostscript text window if any
  1166.  PostScript operators that should not be used in `EPS` files
  1167.  are used.  An example warning message is:
  1168.   Warning: EPS files must not use /initgraphics
  1169.  `EPS Warn` is not infallible.  It is possible to access restricted
  1170.  operators without `EPS Warn` producing a warning.
  1171.  
  1172.  The default for `EPS Warn` is `unchecked`.
  1173.  
  1174.  See also `PS to EPS`.
  1175. 3Ignore DSC
  1176. ?Ignore DSC
  1177.  Some documents incorrectly claim to conform to the Adobe Document
  1178.  Structuring Conventions.  Attempting to display one of these bogus
  1179.  documents will probably leave GSview horribly confused and unable
  1180.  to display the document.  If `Ignore DSC` is `checked`, GSview
  1181.  will treat the document as if it does not contain DSC comments
  1182.  and will only display the pages in the original order.
  1183.  
  1184.  The default for `Ignore DSC` is `unchecked`.
  1185. P
  1186. 3Show Bounding Box
  1187. ?Show Bounding Box
  1188.  Selecting this option causes a dashed rectangle to drawn over
  1189.  the image, showing the location of the bounding box.
  1190.  This bounding box is only drawn on the display, and does not
  1191.  affect printer output.
  1192.  The bounding box will only be shown for `DSC` documents (non
  1193.  conforming documents don't have a bounding box).
  1194.  
  1195.  The default for `Show Bounding Box` is `unchecked`.
  1196. E
  1197. 2Page Orientation
  1198. ?Orientation
  1199. ?Portrait
  1200. ?Landscape
  1201. ?Upside-down
  1202. ?Seascape
  1203. ?Swap Landscape
  1204.  The `Portrait`, `Landscape`, `Upside-down` and `Seascape`
  1205.  (reverse Landscape) commands on the `Orientation `Menu select
  1206.  the page orientation used by the display.
  1207.  `Landscape` implies a clockwise rotation of the paper by 90 degrees.
  1208.  `Seascape` implies an anti-clockwise rotation of the paper by 90 degrees.
  1209.  These orientation options only affect the display and do not affect
  1210.  the print commands.
  1211.  If a `DSC` page orientation comment is found, the orientation will be
  1212.  selected automatically.
  1213.  
  1214.  When the `Swap Landscape` option is `checked`, GSview swaps the
  1215.  meaning of Landscape and Seascape.
  1216.  Most of the Landscape documents that I have encountered require a 90
  1217.  clockwise rotation of the paper to view.
  1218.  However, there is no standard and some documents need to be rotated
  1219.  the other way.
  1220.  The `Swap Landscape` button allows GSview to automatically rotate the
  1221.  document the right way in response to the `%%Orientation` comment in the
  1222.  PostScript file.
  1223.  
  1224.  See also `Page Size and Display Resolution`.
  1225. 2Page Size and Display Resolution
  1226. ?Page Size and Display Resolution
  1227. ?Resolution
  1228. ?Zoom Resolution
  1229. ?Depth
  1230. ?Page Size
  1231. ?Media
  1232. ?User Defined
  1233.  The `Resolution` command on the `Media` menu selects the display
  1234.  resolution in dots per inch.
  1235.  The default for a VGA display is 96 dots per inch.
  1236.  
  1237.  For DSC conforming files, pressing the right mouse button will
  1238.  zoom into the page at what is usually printer resolution.
  1239.  Pressing the right mouse button a second time will zoom back out to
  1240.  normal display resolution.
  1241.  The `Zoom Resolution` command on the `Media` menu sets the zoom
  1242.  resolution in dots per inch.
  1243.  
  1244.  The `Depth` sub menu on the `Media` menu selects the display
  1245.  depth in bits per pixels.
  1246.  
  1247.  The `Media` menu also allows selection of page size.
  1248.  Available page sizes are:
  1249.   Letter          8.5 x 11   inch
  1250.   Tabloid        11   x 17   inch
  1251.   Ledger         17   x 11   inch
  1252.   Legal           8.5 x 14   inch
  1253.   Statement       5.5 x  8.5 inch
  1254.   Executive       7.5 x 10   inch
  1255.   A3              297 x 420  mm
  1256.   A4              210 x 297  mm
  1257.   A5              148 x 210  mm
  1258.   B4              257 x 364  mm
  1259.   B5              182 x 257  mm
  1260.   Folio           8.5 x 13   inch
  1261.   Quarto          8.5 x 10.8 inch
  1262.   10x14          10   x 14   inch
  1263.  
  1264.  A user defined size can be specified in PostScript points (1/72 inch)
  1265.  with the `User Defined` command.  A size of 480x360 points at 96 dpi
  1266.  will give an image size of 640x480 pixels.
  1267.  
  1268.  If a `DSC` media comment is found, the page type will be selected
  1269.  automatically.  If the media specification is not one of the above
  1270.  page types, the `User Defined` size will be set.
  1271. 2Keys
  1272. ?Keys
  1273.  Following are the key assignments for GSview.
  1274.  
  1275.  `O`, `o`  Open and display a file.  (`File` | `Open`)
  1276.  
  1277.  `C`, `c`  Close file.  (`File` | `Close`)
  1278.  
  1279.  `N`, `n`, `+`  Next Page.  (`View` | `Next Page`)
  1280.  
  1281.  `V`, `v`, `-`  Previous Page.  (`View` | `Previous Page`)
  1282.  
  1283.  `G`, `g`  Goto Page.  (`View` | `Goto Page`)
  1284.  
  1285.  `I`, `i`  File information.  (`File` | `Info`)
  1286.  
  1287.  `R`, `r`  Redisplay page.  (`View` | `Redisplay`)
  1288.  
  1289.  `S`, `s`  Select file: open but don't display.  (`File` | `Select File`)
  1290.  
  1291.  `A`, `a`  Save As. (`File` | `Save As`)
  1292.  
  1293.  `P`, `p`  Print all or some pages to a printer.  (`File` | `Print`)
  1294.  
  1295.  `F`, `f`  Print all or some pages to a File.  (`File` | `Print To File`)
  1296.  
  1297.  `E`, `e`  Extract some pages to another File.  (`File` | `Extract`)
  1298.  
  1299.  `F1`  Help.  (`Help` | `Contents`)
  1300.  
  1301.  `Ctrl+C`, `Insert`  Copy displayed bitmap to clipboard.  (`Edit` | `Copy`)
  1302.  
  1303. W
  1304.  `Up`  Scroll up 16 pixels.
  1305.  
  1306.  `Down`  Scroll down 16 pixels.
  1307.  
  1308.  `Left`  Scroll left one screen.
  1309.  
  1310.  `Right`  Scroll right one screen.
  1311. P
  1312.  `Arrow Keys`  Scroll by 16 pixels.
  1313.  
  1314.  `Ctrl+Left`  Scroll left one screen.
  1315.  
  1316.  `Ctrl+Right`  Scroll right one screen.
  1317.  
  1318.  `Ctrl+Page Up`  Scroll left one screen.
  1319.  
  1320.  `Ctrl+Page Down`  Scroll right one screen.
  1321. E
  1322.  
  1323.  `Page Up`  Scroll up one screen (window height).
  1324.  
  1325.  `Page Down`  Scroll down one screen.
  1326.  
  1327.  `Home`  Scroll to top of page.
  1328.  
  1329.  `End`  Scroll to bottom of page.
  1330. W
  1331. 2Running GSview from the File Manager
  1332. ?Registration Info Editor
  1333. ?File Manager
  1334.  To run GSview when a PostScript file is double clicked in the
  1335.  File Manager, the following sequence must be followed to teach
  1336.  File Manager about PostScript files.
  1337.  
  1338.  From the `Program Manager`, run the Registration Info Editor using
  1339.  `File `| `Run...` then type `regedit`.
  1340.  From the `Registration Info Editor` select `Edit `| `Add File Type...`
  1341.  then enter the following fields:
  1342.   Identifier = psfile
  1343.   Filetype = PostScript
  1344.   Action = Open
  1345.   Command = gsview %1
  1346.   Uses DDE = unchecked
  1347.   Action = Print
  1348.   Command = gsview /p %1
  1349.   Uses DDE = unchecked
  1350.  Then press `OK`.
  1351.  
  1352.  From the `File Manager`, select `File `| `Associate` then
  1353.  enter the following fields:
  1354.   Files with Extension = ps
  1355.   Associate With = PostScript (gsview)
  1356.  Then press `OK`.
  1357.  
  1358.  Put gsview.exe and gsview.hlp in a directory on your PATH.
  1359.  That's it!  Now when you double click on a PostScript file,
  1360.  the `File Manager` will run GSview.  When you drop a PostScript
  1361.  file on the `Print Manager`, GSview will print the file.
  1362. E
  1363. 2Command line options
  1364. ?Command line options
  1365.  Usage:
  1366. W
  1367.   gsview [/D] filename
  1368.   gsview [/D] /F filename
  1369.   gsview [/D] /P filename
  1370.   gsview [/D] /S[port] filename
  1371. P
  1372.   gvpm [/D] filename
  1373.   gvpm [/D] /F filename
  1374.   gvpm [/D] /P filename
  1375. E
  1376.  
  1377.  To start GSview and display filename.ps use:
  1378. W
  1379.   gsview filename.ps
  1380. P
  1381.   gvpm filename.ps
  1382. E
  1383.  To start GSview and print filename.ps using Ghostscript
  1384.  (`File` | `Print`) use:
  1385. W
  1386.   gsview /P filename.ps
  1387. P
  1388.   gvpm /P filename.ps
  1389. E
  1390.  To start GSview and print filename.ps to a file using Ghostscript
  1391.  (`File` | `Print To File`) use:
  1392. W
  1393.   gsview /F filename.ps
  1394. P
  1395.   gvpm /F filename.ps
  1396. E
  1397. W
  1398.  To start GSview and spool filename.ps for printing directly to
  1399.  a printer (`File` | `Print File`) use:
  1400.   gsview /S filename.ps
  1401.  To start GSview and spool filename.ps for printing directly to
  1402.  printer port LPT3: use:
  1403.   gsview /SLPT3: filename.ps
  1404. E
  1405.  
  1406.  To start GSview in debug mode use:
  1407. W
  1408.   gsview /D
  1409. P
  1410.   gvpm /D
  1411. E
  1412.  In debug mode GSview will `not` remove its temporary files.
  1413.  This is to allow inspection of these files after GSview has finished.
  1414.  
  1415.  GSview ignores the case of option:
  1416.  /p is the same as /P.
  1417. 2World Wide Web
  1418. ?World Wide Web
  1419. ?WWW
  1420. ?HTML
  1421.  The World Wide Web home page for Ghostscript, Ghostview and GSview 
  1422.  is at
  1423.   http://www.cs.wisc.edu/~ghost/index.html
  1424.  
  1425.  GSview can be used as a PostScript file viewer for several OS/2
  1426.  and MS-Windows Web browsers.  See the GSview home page for details.
  1427. 2Copyright
  1428. ?Copyright
  1429.  The `About` menu item shows the GSview copyright message
  1430.  and GSview version number.
  1431.  
  1432. W
  1433.   GSVIEW.EXE - A Ghostscript graphical interface
  1434. P
  1435.   GVPM.EXE - A Ghostscript graphical interface
  1436. E
  1437.   Copyright (C) 1993, 1994, Russell Lang.  All rights reserved.
  1438.   Portions Copyright (C) 1994, Timothy O. Theisen.  All rights reserved.
  1439.  
  1440.  This file is part of GSview.
  1441.  
  1442.  This program is distributed with NO WARRANTY OF ANY KIND.  No author
  1443.  or distributor accepts any responsibility for the consequences of using it,
  1444.  or for whether it serves any particular purpose or works at all, unless he
  1445.  or she says so in writing.  Refer to the GSview Free Public Licence
  1446.  (the "Licence") for full details.
  1447.  
  1448.  Every copy of GSview must include a copy of the Licence, normally in a
  1449.  plain ASCII text file named LICENCE.  The Licence grants you the right
  1450.  to copy, modify and redistribute GSview, but only under certain conditions
  1451.  described in the Licence.  Among other things, the Licence requires that
  1452.  the copyright notice and this notice be preserved on all copies.
  1453.  
  1454.      Author: Russell Lang
  1455.    Internet: rjl@aladdin.com
  1456. 2Common Problems
  1457. ?Common Problems
  1458. ?Problems
  1459. W
  1460.  `Problem:` Can't run gswin...
  1461.  
  1462.  GSview requires Ghostscript for Windows (gswin.exe).
  1463.  This error message usually occurs if you don't have Ghostscript
  1464.  for Windows, or if GSview can't find Ghostscript for Windows.
  1465.  
  1466.  From the GSview menu select `Options` | `Ghostscript Command`
  1467.  and enter the correct executable path and include path for Ghostscript.
  1468.  For example:
  1469.   c:\gs\gswin.exe -Ic:\gs
  1470.  
  1471.  You must set the include path for Ghostscript using either the
  1472.  `-I` command or the `GS_LIB` environment variable.
  1473.  
  1474.  Make sure you don't already have Windows Ghostscript running.
  1475.  Only one copy of Windows Ghostscript can be running at a time.
  1476.  Only one copy of GSview can be running at a time.
  1477.  
  1478.  If you can't get GSview to run Ghostscript correctly, make sure
  1479.  you can run Ghostscript on its own.
  1480. P
  1481.  `Problem:` Can't run gsos2...
  1482.  
  1483.  GSview requires OS/2 Ghostscript (gsos2.exe).
  1484.  This error message occurs if you don't have OS/2 Ghostscript,
  1485.  or if GSview can't find OS/2 Ghostscript.
  1486.  
  1487.  From the GSview menu select `Options` | `Ghostscript Command`
  1488.  and enter the correct executable path and include path for Ghostscript.
  1489.  For example:
  1490.   c:\gs\gsos2.exe -Ic:\gs;c:\gs\fonts;c:\psfonts
  1491.  
  1492.  You must set the include path for Ghostscript using either the
  1493.  `-I` command or the `GS_LIB` environment variable.
  1494.  
  1495.  If you can't get GSview to run Ghostscript correctly, make sure
  1496.  you can run Ghostscript on its own.
  1497. E
  1498.  
  1499.  `Problem:` Ghostscript starts and then immediately exits with error code 1.
  1500.  
  1501. W
  1502.  Read the error message in the Ghostscript window before pressing
  1503.  OK in the message box.
  1504.  
  1505. E
  1506.  Ghostscript probably couldn't find its initialisation files.
  1507.  Set the Ghostscript include path by adding `-Idirectory` to the
  1508.  command in `Options` | `Ghostscript Command`, where `directory`
  1509.  includes the name of the directory that contains the Ghostscript
  1510.  initialisation files,
  1511.  Alternatively, set the environment variable GS_LIB.
  1512.  
  1513.  Read the file use.doc that comes with Ghostscript.
  1514.  
  1515.  If you can't get GSview to run Ghostscript correctly, make sure
  1516.  you can run Ghostscript on its own.
  1517.  
  1518. W
  1519.  Alternatively, you may be using an incompatible version of Ghostscript,
  1520.  or you may have the `Options` | `Ghostscript Version` set incorrectly.
  1521.  This version of GSview should be used with Ghostscript version `3.12` 
  1522.  or later.
  1523.  If you are using an incompatible version of Ghostscript or you
  1524.  have `Options` | `Ghostscript Version` set incorrectly, the
  1525.  Ghostscript text window will show one of the following error messages
  1526.   undefined in ear
  1527.   undefined in XXclear
  1528.  where `XX` are a pair of garbage characters.
  1529.  
  1530.  `Problem:` Message Box says `Incompatible Windows Ghostscript`
  1531.  
  1532.  You probably have an earlier version of Ghostscript.
  1533.  Get Ghostscript version 3.12 or later.
  1534.  
  1535.  `Problem:` GSview says 'Drawing...' or 'Printing...' and shows an
  1536.  hourglass cursor.  When the cursor is moved off the GSview window
  1537.  it changes to a normal arrow.
  1538.  
  1539.  The above state is normal while GSview is waiting for Ghostscript
  1540.  to do something.  It may be that the document is very complex and
  1541.  Ghostscript is just taking a long time.  In this state it is safe to
  1542.  resize or scroll the window, but do not select any menu commands.
  1543.  
  1544.  If this is not the case then GSview probably got no response
  1545.  from Ghostscript.
  1546.  Open the Ghostscript text window and look at any error messages.
  1547.  Close Ghostscript using the Ghostscript system menu.
  1548.  If GSview is still waiting, press the GSview Open button
  1549.  (even though the cursor is still an hourglass).
  1550.  Press the 'Yes' button on the 'gsview is busy' message box.
  1551.  GSview should then revert to the non-waiting mode.
  1552.  
  1553.  `Problem:` Message Box says `Imitation pipe handle is zero`
  1554.  
  1555.  If you are running Windows 95 or NT, this is probably caused by a mismatch
  1556.  between GSview and Ghostscript. Make sure you are running both GSview32 
  1557.  and gswin32.
  1558.  
  1559.  `Problem:` GSview displays a "Pipe error" message box.
  1560.  
  1561.  GSview could not open a temporary file.  GSview requires a temporary
  1562.  file for `piping` commands to Ghostscript.  This temporary file is
  1563.  created in the directory given by the environment variable TEMP,
  1564.  or if that is not set, in the current directory.
  1565.  `Pipe error` will result when
  1566.  
  1567.  1. TEMP is not set and the current directory is read-only.
  1568.  For example, the current directory is on a CD-ROM or a network.
  1569.  
  1570.  Solution:  Set TEMP environment variable in AUTOEXEC.BAT.
  1571.  
  1572.  2. TEMP is set but does not point to a valid read-write directory.
  1573.  
  1574.  Solution: Change TEMP to point to a directory that exists
  1575.  and is read-write.
  1576.  
  1577.  3. Disk is full.
  1578. E
  1579.  
  1580.  `Problem:` GSview says that a multipage PostScript file produced
  1581.  by MS-Windows contains 0 pages and will only show the first page.
  1582.  
  1583.  This is because the document does not have correct DSC comments.
  1584.  From the Control Panel, select `Printers`, `Options...`, then in the
  1585.  `Print to` group box click on the `Printer` radio button.  You cannot
  1586.  use the `Print To` `Encapsulated PostScript File` for printing
  1587.  multipage files.  The correct method is to connect the printer
  1588.  to `FILE:`.
  1589.  In addition,
  1590.  from the Control Panel select `Printers`, `Options...`, `Advanced` and
  1591.  then check `Conform to Adobe Document Structuring Convention`.
  1592.  
  1593.  The DSC comment `%%Pages: 0` means that the document does not produce
  1594.  any pages.  That is, the PostScript `showpage` operator is not used.
  1595.  If you find a PostScript document that has multiple pages and contains
  1596.  the `%%Pages: 0` comment, change the first line from `%!PS-Adobe-` to `%!`.
  1597.  GSview will then ignore the DSC comments and allow you to view all
  1598.  pages, but only in the original order.  Complain to the author of the
  1599.  program that produced that PostScript file.
  1600.  
  1601.  Some PostScript printer drivers include code that is specific to 
  1602.  a particular printer.  The PostScript output from these drivers may
  1603.  be unportable and may not display in GSview.  If you are having this
  1604.  problem, try using a reasonably generic PostScript driver such as
  1605.  `Apple LaserWriter II NT` for PostScript level 2 printers, or
  1606.  `Apple LaserWriter Plus` for PostScript level 1 printers.
  1607.  
  1608.  `Problem:` PostScript files produced by MS-Windows start with a Control-D.
  1609.  
  1610.  Since this occurs even when the PostScript printer
  1611.  `Conform to Document Structuring Convention`
  1612.  checkbox is checked, this must be considered a
  1613.  bug in the MS-Windows PostScript printer driver.
  1614.  The bug fix is documented in the MS-Windows PRINTERS.WRI file.
  1615.  Edit the win.ini file and search for the PostScript printer section.
  1616.  There may be more than one.  In each of these sections add
  1617.  `CTRLD=0` as shown below.
  1618.  
  1619.   [Apple LaserWriter II NT,FILE]
  1620.   CTRLD=0
  1621.  
  1622.  `Problem:` PostScript files produced by Word for Windows 6.0
  1623.  cause a "Missing %%Pages comment" message box.
  1624.  
  1625.  Congratulations.  You have just found a mistake in the DSC comments
  1626.  when Word included an EPS file.  Word should have surrounded the
  1627.  included EPS file with the lines
  1628.   %%BeginDocument: filename.eps
  1629.   %%EndDocument
  1630.  Because Word didn't do this, GSview can't tell how many pages
  1631.  are in the document and where they are located.
  1632.  
  1633.  Please complain to Microsoft.  There is a problem in the EPSIMP.FLT
  1634.  filter version 2.01 which Microsoft needs to fix.
  1635.  
  1636.  In the interim, you have two solutions:
  1637.  
  1638.  1. Select `Options` | `Ignore DSC`
  1639.  
  1640.  2. Edit the PostScript file to correct the DSC comments.
  1641.  Search the PostScript file for all lines containing
  1642.    %MSEPS Preamble
  1643.  From each of these lines, search forward for the start of the
  1644.  included EPS file which should start with a line like
  1645.   %%PS-Adobe-3.0 EPSF-3.0
  1646.  Above these lines add the line
  1647.   %%BeginDocument: AddedByHand
  1648.  
  1649.  Then search for all lines containing
  1650.   %MSEPS Trailer
  1651.  Above these lines add the line
  1652.   %%EndDocument
  1653.  
  1654.  GSview should then be able to display the file correctly.
  1655.  
  1656.  `Problem:` Ghostscript always outputs to a printer instead of the
  1657.  GSview window.
  1658.  
  1659.  You must not use the GS_DEVICE environment variable.
  1660. W
  1661.  
  1662.  `Problem:` Ghostscript displays a message box "pipe overflow".
  1663.  
  1664.  The document may contain incorrect DSC comments.
  1665.  
  1666.  You must wait until Ghostscript is not busy before attempting to
  1667.  display another page.  Exit and then restart GSview.
  1668. E
  1669. 2Internals
  1670. ?Internals
  1671. W
  1672.  The preferred method for driving Ghostscript would be to start it
  1673.  as a child process and then to send it PostScript code through a pipe.
  1674.  Windows 3.1 supports neither child processes nor pipes.
  1675.  
  1676.  GSview interacts with Ghostscript by sending messages between
  1677.  the GSview and Ghostscript windows.
  1678.  GSview creates an imitation pipe to Ghostscript by writing
  1679.  into a shareable global memory block (or memory mapped file
  1680.  under Windows 95 or NT) and then passing the handle to Ghostscript.
  1681.  
  1682.  GSview starts Ghostscript for displaying using
  1683.   gswin -dBitsPerPixel=x -dSAFER -rXDPIxYDPI -gWIDTHxHEIGHT -sGSVIEW=xxxx -
  1684.  where xxxx is the handle to the GSview window.
  1685.  Ghostscript then tells GSview the handle to the text window by sending
  1686.  a message WM_USER with wParam HWND_TEXT=0 to the GSview window.
  1687.  Instead of creating another window for the image, Ghostscript
  1688.  creates a child window of the GSview window for displaying
  1689.  the bitmap. Ghostscript tells GSview the handle to this child
  1690.  image window by sending a message WM_USER with wParam
  1691.  HWND_IMGCHILD=1.
  1692.  
  1693.  Ghostscript also sends WM_USER messages to GSview with wParam
  1694.  GSWIN_CLOSE=2 when it is exiting,
  1695.  SYNC_OUTPUT=3 when the image needs to be redrawn (win_sync_output),
  1696.  OUTPUT_PAGE=4 when a page is to be output (win_output_page),
  1697.  SCROLL_POSITION=5 when the window is scrolled,
  1698.  PIPE_DATA=6 for passing the handle to a global memory block (in
  1699.  lParam) for the imitation pipe,
  1700.  BEGIN=7 when "-1 false .outputpage" is executed and
  1701.  END=8 when "-2 false .outputpage" is executed.
  1702.  
  1703.  When Ghostscript sends the OUTPUT_PAGE command it waits until it
  1704.  receives a NEXT_PAGE command from GSview.
  1705.  
  1706.  GSview sends WM_USER messages to the Ghostscript Image window with
  1707.  wParam NEXT_PAGE=10 when it is time to move to the next page and
  1708.  COPY_CLIPBOARD=11 when the bitmap should be copied to the clipboard.
  1709.  GSview sends WM_USER messages to the Ghostscript Text window with
  1710.  wParam PIPE_REQUEST=12 when it wants more pipe data.
  1711.  
  1712.  GSview uses temporary files of the name gsviewXX.XXX in the
  1713.  directory given by the TEMP environment variable.
  1714.  Keep TEMP short to avoid the gswin command line exceeding 128 characters.
  1715.  
  1716.  GSview starts Ghostscript for printing using
  1717.   gswin -sGSVIEW=xxxx @optfile
  1718.  optfile contains
  1719.   -dNOPAUSE
  1720.   -dSAFER
  1721.   -sDEVICE=devname
  1722.   -rXDPIxYDPI
  1723.   -gWIDTHxHEIGHT
  1724.   -sOutputFile=outfilename
  1725.   filename.ps
  1726.   quit.ps
  1727.  
  1728. P
  1729.  GSview starts Ghostscript for displaying using
  1730.   gsos2 -dBitsPerPixel=x -dSAFER -rXDPIxYDPI -gWIDTHxHEIGHT -sGSVIEW=xxxx -
  1731.  where xxxx is a string used to access a named shareable memory block,
  1732.  two semaphores and a queue.  These are listed in gdevpm.h.
  1733.  The shareable memory block contains a bitmap in BMP format.
  1734.  The SYNC semaphore is not used (it is used by gspmdrv.exe instead).
  1735.  The NEXT semaphore is used when waiting at each showpage.
  1736.  The MUTEX is used to sychronise access to the bitmap.
  1737.  The QUEUE is used by Ghostscript to notify GSview about the
  1738.  following significant events:  1. Starting to draw into bitmap,
  1739.  2. Synchronise (redraw) page, 3. showpage (redraw page),
  1740.  4. Ghostscript is closing, 5. Ghostscript fatal error,
  1741.  6. Palette in bitmap has changed,
  1742.  7. "-1 false .outputpage" is executed,
  1743.  8. "-2 false .outputpage" is executed.
  1744.  PostScript code is piped to the Ghostscript stdin.
  1745.  Ghostscript stdout goes to a window.
  1746.  
  1747.  GSview uses temporary files of the name gvXXXXXX in the
  1748.  directory given by the TEMP environment variable.
  1749.  
  1750.  GSview starts Ghostscript for printing using
  1751.   gsos2 @optfile
  1752.  optfile contains
  1753.   -dNOPAUSE
  1754.   -dSAFER
  1755.   -sDEVICE=devname
  1756.   -rXDPIxYDPI
  1757.   -gWIDTHxHEIGHT
  1758.   -sOutputFile=outfilename
  1759.   filename.ps
  1760.   quit.ps
  1761.  
  1762. E
  1763.