home *** CD-ROM | disk | FTP | other *** search
/ swCHIP 1991 January / swCHIP_95-1.bin / utility / gsview13 / gvpm.hlp (.txt) < prev    next >
OS/2 Help File  |  1995-12-09  |  50KB  |  1,393 lines

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