showps - Adobe Systems PostScript language document previewer.
showps [-usage] [-help] [-dis1] [-dis2] [-dis3] [-dis4] [-ept] [-igc] [-maxp size] [-mono] [-or orientation] [-pro file] [-qfb] [-ps pagesize] [-repsf] [-pscan size] [-sc scale] [-sf] [-skipc] [-tdir dir] [-v] [-wp] [-] [files]
You can provide command line options in upper or lower case (the argument to the -ps option is the only exception). The options may appear in any order, but filenames must come after all other options. Instead of using an option, you can often set an X resource or select a menu command to achieve the same behavior change. In that case: Use the X resource to permanently set your preferred default (see RESOURCES). Use the option to override the resource setting for one session. Use the menu command to temporarily override the resource or option setting (see USER INTERFACE).
The Adobe ShowPS program supports all standard X toolkit options described in the X(1X) manual page. In addition, the program supports the following options: (display option 1) Displays the Shortcut Panel at startup for immediate access. The Shortcut Panel contains commonly used File, Page, and Controls menu commands. Resource: displayShortcutPanelDialogAtStartup (display option 2) Displays the Scale Selection panel at startup. The Scale Selection panel lets you enlarge or reduce the displayed image. Resource: displayScaleSelectionDialogAtStartup (display option 3) Displays the Page Selection panel at startup. The Page Selection panel lets you select a page for viewing. Resource: displayPageSelectionDialogAtStartup (display option 4) Displays the Page Orientation panel at startup. The Page Orientation panel lets you change the orientation of the page within the window. Resource: displayPageOrientationDialogAtStartup (emulate paper trays) Changes the page size when the PostScript language document contains a request for a different paper size. You need this option only if the associated X resource, emulatePaperTrays, has been set to False and you want to change the behavior. Resource: emulatePaperTrays Lists command syntax, command-line options summary, and X resource for each option. (ignore comments) Ignores all document structuring convention (DSC) comments in a PostScript language file, that is, treats the document as an unstructured document. This can be helpful for viewing an incorrectly structured document. Resource: ignoreComments When the program displays a page, it first writes the whole page to an offscreen buffer called a pixmap, then copies the buffer content to the window. The -maxp option sets the maximum number of bytes of memory that the program is allowed to allocate for that buffer. The default value is 4 Mbytes.
The Adobe ShowPS program displays PostScript language documents in an X window, using the Display PostScript extension in the X server.
The program allows you to preview and page through both structured and
unstructured PostScript language documents. You can choose the size, scale,
and orientation of the display.
If a document uses the PostScript language incorrectly, the program may not be able to display it.
A file type should be indicated on the first line of the document, even
if it is a hand-coded PostScript language file. An unstructured document is
indicated by a percent sign directly followed by an exclamation point (%!).
If the ``%!'' characters are not found on the first line of the file, the
previewer will open a dialog window in which you can specify the file as an
unstructured PostScript document.
The ShowPS program does not require a structured PostScript language document, as defined in Appendix G of the PostScript Language Reference Manual, Second Edition.
When you view an unstructured document you cannot go directly to a page, but you can page forward through the document and return to the first page. The program displays a trailing blank page at the end of each unstructured document.
If a document uses DSC comments incorrectly, the program may not be able to display it or may display it as an unstructured document.
The program detects structured documents whose pages have been placed in reverse order and displays the pages in normal order.
When you view a standalone Encapsulated PostScript (EPS) file the program
displays the file with its top left corner in the top left corner of the window.
This reduces unnecessary scrolling. You can use the
option, or the
Reposition EPS Files
command in the
menu to change this behavior.
When the Adobe ShowPS program displays a page, it first draws the whole page to a pixmap. By default, the program allocates 4 Mbytes of memory for the pixmap. The exact number depends on the machine on which you have the display. You can change the upper limit with the -maxp option.
A large page size, whether requested by the -ps option or by a command in the PostScript language document, requires allocation of a substantial amount of memory. For example, on a machine that displays 100 dots per linear inch, each square inch has 10 000 dots. If the machine is an 8-bit color machine, 10 kilobytes are needed for each square inch of the page.
If the combination of the requested page size and scale factor require pixmap memory that exceeds the upper limit, the program does not allocate a pixmap but draws directly to the window instead. In that case, the program displays a warning message. Whether this message is displayed again depends on the action you take: If you reduce the scale factor but the required pixmap storage still exceeds the number specified by the -maxp option, the message is displayed again. This helps you determine how far the scale factor has to be reduced. If you increase the scale factor, the message is not redisplayed, since you already know there is not enough space. This prevents the message from popping up repeatedly as you move the scale slider. If you don't reduce the scale factor and open another file, that file won't have a pixmap either. Since you have been informed already, no message is displayed.
After you have acknowledged the message, structured documents are drawn
directly to the window. If you are viewing an unstructured document, the previewer
can display only the part of the page that was in the viewing area and not
covered by other panels. You have two options:
Decrease the scale factor until the previewer can allocate
a pixmap again, using the error messages as a guide.
Scroll the page to view the area you want to examine, then
page forward to the information you want to see.
Previous Alt/B Next Alt/F Open... Alt/O Reopen Alt/R Exit Alt/Q
Previous Page Alt/b, b, p Next Page Alt/f, f, n, Return, spacebar Last
Page Viewed Alt/l Redraw Page Alt/r Page Selection... Alt/p
Interrupt Alt/I Continue Alt/C
Shortcut Panel... Alt/c Scale Selection... Alt/s Page Orientation...
Page size options include page sizes defined by the user and the following international standard page sizes:
Metric ISO A sizes: a0 841.0 x 1189.0 mm (33.11 x 46.81 in) a1 594.0 x 841.0 mm (23.39 x 33.11 in) a2 420.0 x 594.0 mm (16.54 x 23.39 in) a3 297.0 x 420.0 mm (11.69 x 16.54 in) a4 210.0 x 297.0 mm ( 8.27 x 11.69 in) a5 148.0 x 210.0 mm ( 5.83 x 8.27 in) a6 105.0 x 148.0 mm ( 4.13 x 5.83 in) a7 74.0 x 105.0 mm ( 2.91 x 4.13 in) a8 52.0 x 74.0 mm ( 2.05 x 2.91 in) a9 37.0 x 52.0 mm ( 1.46 x 2.05 in) a10 26.0 x 37.0 mm ( 1.02 x 1.46 in)
Metric ISO B sizes: b0 1000.0 x 1414.0 mm (39.37 x 55.67 in) b1 707.0 x 1000.0 mm (27.83 x 39.37 in) b2 500.0 x 707.0 mm (19.68 x 27.83 in) b3 353.0 x 500.0 mm (13.90 x 19.68 in) b4 250.0 x 353.0 mm ( 9.84 x 13.90 in) b5 176.0 x 250.0 mm ( 6.93 x 9.84 in) b6 125.0 x 176.0 mm ( 4.92 x 6.93 in) b7 88.0 x 125.0 mm ( 3.46 x 4.92 in) b8 62.0 x 88.0 mm ( 2.44 x 3.46 in) b9 44.0 x 62.0 mm ( 1.73 x 2.44 in) b10 31.0 x 44.0 mm ( 1.22 x 1.73 in)
Metric ISO C sizes: c0 914.4 x 1300.5 mm (36.00 x 51.20 in) c1 650.2 x 914.4 mm (25.60 x 36.00 in) c2 457.2 x 650.2 mm (18.00 x 25.60 in) c3 325.1 x 457.2 mm (12.80 x 18.00 in) c4 228.6 x 325.1 mm ( 9.00 x 12.80 in) c5 162.6 x 228.6 mm ( 6.40 x 9.00 in) c6 114.3 x 162.6 mm ( 4.50 x 6.40 in) c7 81.3 x 114.3 mm ( 3.20 x 4.50 in)
American ANSI sizes:
a 8.5 x 11.0 in ( 215.9 x
279.4 mm) b 11.0 x 17.0 in ( 279.4 x 431.8 mm) c 17.0 x 22.0 in ( 431.8
x 558.8 mm) d 22.0 x 34.0 in ( 558.8 x 863.6 mm) e 34.0 x 44.0 in ( 863.6
x 1117.6 mm) f 28.0 x 40.0 in ( 711.2 x 1016.0 mm) e1 44.0 x 68.0 in (1117.6
x 1727.2 mm)
To load two files into the previewer, the first a document in the current directory, the second from /usr/local/docs: % showps mydoc.ps /usr/local/docs/manual.ps
To view the plain text file story.txt, run the file through a program that generates PostScript language output and pipe the output to the previewer's stdin.
To load a file at double scale: % showps -sc 2 filename
To start the program for viewing a4 documents: % showps -ps a4
To start the program for viewing documents 30 cm high by 20 cm wide: % showps -ps 20cm:30cm
To set a maximum pixmap size of 5 Mbytes: % showps -maxp 5m
The name of the application defaults file for the Adobe ShowPS program is Showps. This file should be changed by the system administrator only. Many of the widgets used by the program get their resources from this file. The file must be in one of the directories specified by the XFILESEARCHPATH environment variable. If your site requires the use of a custom prolog file, the system administrator should set the value of the prologFile resource in the Showps file.
To override any of the resources, set them in your
The program understands standard Motif resource names and classes. In addition, the following resources allow application-specific customization.
displayShortcutPanelDialogAtStartup Type: boolean; Default: False Option: -dis1; Menu: Shortcut Panel
Description: Instructs the previewer to open the Shortcut Panel at startup. The Shortcut Panel contains commonly used File, Page, and Controls menu commands.
displayScaleSelectionDialogAtStartup Type: boolean; Default: False Option: -dis2; Menu: Scale Selection
Description: Instructs the previewer to open the Scale Selection panel at startup. The Scale Selection panel lets you enlarge or reduce the displayed image.
displayPageSelectionDialogAtStartup Type: boolean; Default: False Option: -dis3; Menu: Page Selection
Description: Instructs the previewer to open the Page Selection panel at startup. The Page Selection panel lets you select a page for viewing.
displayPageOrientationDialogAtStartup Type: boolean; Default: False Option: -dis4; Menu: Page Orientation
Description: Instructs the previewer to open the Page Orientation panel at startup. The Page Orientation panel lets you change the orientation of the page within the window.
emulatePaperTrays Type: boolean; Default: True Option: -ept; Menu: Emulate Paper Trays
Description: Instructs the program to honor requests for paper tray changes that come from the PostScript language document itself by using a different size display when the document calls for a different size paper. When set to False, the program ignores paper tray requests.
ignoreComments Type: boolean; Default: False Option: -igc; Menu: Ignore Comments
Description: Instructs the program to ignore any DSC comments it finds in a document and to treat the document as unstructured.
maxPixmapBytes Type: integer; Default: 4 Mbytes Option: -maxp
Description: Allows you to set the maximum number of bytes allowed for the pixmap that the program draws to before displaying a page. See the -maxp option for more information. In contrast to the -maxp option, the value of this resource must be an integer. Scale factors (m and k) cannot be used.
monochrome Type: boolean; Default: False Option: -mono; Menu: Monochrome
Description: Instructs the program to display documents in monochrome even on a color display. This simulates the effect of printing on a monochrome printer.
pageOrientation Type: string; Default: portrait Option: -or; Menu: Page Orientation
Description: Allows you to select the initial orientation of a previewed page. Possible settings are portrait, landscape, flip_portrait, flip_landscape.
pageSize Type: string; Default: letter Option: -ps
Description: Allows you to set the default page size. See PAGE SIZES for a list of standard page sizes.
preScanSize Type: integer; Default: 8200 Option: -pscan
Description: Certain applications prepend sequences of control characters and other text strings to the PostScript files they generate. When the previewer opens such a file, it searches through the first preScanSize characters for the PostScript identifier string ``%!''. If found, the previewer starts rendering the PostScript file starting at the file offset where the identifier was found. If not found, the previewer assumes that the identifier starts at the character immediately following the first preScanSize characters of the file. If the identifier string is missing, the previewer displays a dialog box that asks whether to display the file anyway.
Unlike the -pscan option, this resource must be an integer. Scale factors (m and k) cannot be used. If preScanSize is greater than 100 Mbytes, an error message results. If preScanSize is zero, the previewer skips the pre-scan and assumes that the PostScript identifier string starts in the first position in the first line of the file. The default value (8200) allows for the common case in which the header size is 8192 bytes.
prologFile Type: string; Default: none Option: -ps
Description: Sets the pathname to an external PostScript prolog file. The previewer sends this file to the Display PostScript context after the internal prolog and before the PostScript file. This resource can be used to implement stubs for site-specific statusdict operators, which may be used in PostScript files at certain sites.
readFromStandardInput Type: boolean; Default: False
Description: Determines whether the program reads from stdin by default, or only when the "-" option is used.
If the "-" option is used to read from stdin, or if the readFromStandardInput resource is True, the program may have to allocate a temporary file during processing of stdin. By default, the file is placed in /tmp and deleted automatically when it is no longer needed. Use the tempDir resource or the -tdir option to change the default directory.
repositionEPSF Type: boolean; Default: True Option: -repsf; Menu: Reposition EPS Files
Description: Determines whether the program places the upper left corner of an EPS image in the upper left corner of the page.
scale Type: float; Default: 1.0 Option: -sc; Menu: Scale Selection Panel
Description: Allows you to select the initial scale factor at which to view documents.
skipCopyright Type: boolean; Default: False Option: -skipc
Description: Instructs the program to bypass the display of the copyright notice upon startup.
substituteFonts Type: boolean; Default: True Option: -sf; Menu: Substitute Fonts
Description: Instructs the program to substitute Courier for any missing fonts.
tempDir Type: string; Default: /tmp Option: -tdir dir
Description: When the previewer reads from stdin, it temporarily stores the input in the directory specified by tempDir and later removes it.
verbose Type: boolean; Default: False Option: -v
Description: When you set this resource to True, the program prints a short message to stderr each time an error dialog box is displayed.
watchProgress Type: boolean; Default: False Option: -wp; Menu: Watch Progress
Description: Instructs the program to update the display while rendering
is in progress instead of waiting for a page to complete before displaying
any of it.
The following X resources are used to coordinate the Adobe ShowPS application with the Display PostScript NX software. See the Display PostScript NX documentation for more information.
dpsnxAgent Type: string; Default: not set
Description: Selects Display PostScript NX agent to connect to. When this resource is not set, the Display PostScript NX agent default is used. String format: [hostname]:[:]portnumber
dpsnxAgentExec Type: string; Default: /usr/bin/X11/dpsnx.agent
Description: Sets path to executable Display PostScript NX agent.
dpsnxDebugLevel Type: int; Default: 0
Description: Sets debug level for Display PostScript NX agent.
dpsnxExtraStack Type: int; Default: 0
Description: Adds extra stackspace for Display PostScript contexts.
dpsnxLingerTime Type: string; Default: 0:05
Description: Sets the linger time, in [hh:mm] format, for the NX agent. Linger time is the time the agent listens for new connections before it disconnects. Default is five minutes.
dpsnxNoLog Type: boolean; Default: False
Description: Sends Display PostScript NX debug log info to stderr.
dpsnxPSResDir Type: string; Default: not set
Description: Sets path to Display PostScript NX agent resource directory. Typical value is /usr/lib/X11/DPS. When this resource is not set, the Display PostScript NX agent default is used.
dpsnxPixMapMemory Type: string; Default: not set
Description: Sets use of pixmaps for Display PostScript NX agent. One of three arguments can be used: limited, moderate, or unlimited. When this resource is not set, the Display PostScript NX agent default is used.
dpsnxPortNumber Type: int; Default: not set
Description: Sets port number for the Display PostScript NX agent. When this resource is not set, the Display PostScript NX agent default is used.
dpsnxQuantum Type: int; Default: 1000
Description: Sets operator quantum for the Display PostScript NX agent.
dpsnxSynchronous Type: boolean; Default: False
Description: Sets synchronous mode in the Display PostScript NX agent.
dpsnxTransport Type: string; Default: not set
Description: Sets Display PostScript NX agent transport protocol. Values are limited to one of the following: tcp, unix, or When this resource is not set, the Display PostScript NX agent default is used.
dpsnxUseXFonts Type: boolean; Default: False
Description: Causes the Display PostScript NX agent to use X11 fonts
instead of Type 1 fonts for small sizes.
If you are using a grayscale monitor and color pages are displaying poorly -- for example, if shades of red and blue are indistinguishable -- your X server is most likely misconfigured as a color server. This problem frequently manifests itself on SPARCstation X servers. Adding the option -cc 1 to the command line that invokes your X server usually corrects the problem. If this does not work, or if you are unable to change your X server invocation, add the following lines to your .Xdefaults file:
DPSColorCube.PseudoColor.8.reds: 0 DPSColorCube.PseudoColor.8.grays: 17
Copyright 1991, 1992 Adobe Systems Incorporated. All Rights Reserved.
Adobe, Adobe ShowPS, PostScript, Display PostScript, and TranScript are trademarks of Adobe Systems Incorporated which may be registered in certain jurisdictions.
Motif is a trademark of the Open Software Foundation, Inc.
 O'Reilly & Assoc., The Definitive Guides to the X Window System, Vol. 0-7.
 Adobe Systems Incorporated, Programming the Display PostScript System with X (Addison-Wesley Publishing Co., 1993).
 Adobe Systems Incorporated, PostScript Language Reference Manual, Second Edition (Addison-Wesley Publishing Co., 1990).