Content-type: text/html Man page of showps

showps

Section: (1X)
Updated:
Index Return to Main Contents
 

NAME

showps - Adobe Systems PostScript language document previewer.  

SYNOPSIS

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]


 

OPTIONS

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 size parameter may be followed by `k` for kilobytes or `m` for megabytes; for example, -maxp 3m. If size is zero, the program does not create a pixmap and draws directly to the window. Final window size is based on the page size specification and the scale factor. If either the final window width or the final window height exceeds 8 000 pixels, the program reduces the scale factor.
A large page size requires allocation of a substantial amount of memory for the pixmap. If the memory required for the pixmap exceeds the default or the limit set by this option, the program displays a message and draws directly to the window afterward. See EXCEEDING PIXMAP MEMORY below.
If you increase the value of the size parameter beyond the default, the previewer may slow down when you increase the scale factor. This is caused by increased paging in the system when the X server allocates a large pixmap. Resource: maxPixmapBytes Displays documents as they would appear on a monochrome printer. This may improve performance of the previewer, since monochrome documents require a much smaller pixmap. You can choose between optimum performance and optimum display quality: Consider using -mono to enhance performance if you are previewing monochrome documents on a color display. Don't use -mono if memory or speed are not an issue; this gets you the highest quality display on all monitors.
Resource: monochrome Sets the page orientation to the specified value. Valid choices are: portrait -- The "normal" upright orientation landscape -- The page rotated 90 degrees clockwise flip_portrait -- The page rotated 180 degrees clockwise flip_landscape -- The page rotated 270 degrees clockwise
Resource: pageOrientation 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 option can be used to implement stubs for site-specific statusdict operators, which may be used in PostScript files at certain sites. Resource: prologFile Specifies the size of the drawing area. pagesize can be the name of a standard page size (ledger, b, c0, and so on) or two numbers, separated by a colon, that define the width and height of a custom page. The default page size is 8.5 x 11 inches. Possible values for the pagesize argument include: a, b, c, d, e, f, or e1 (American ANSI) a0, a1, ... a10 (metric ISO) b0, b1, ... b10 (metric ISO) c0, c1, ... c7 (metric ISO) width:height (custom size)
Width and height are by default specified in inches and may be integers or floating-point numbers. To specify units other than inches, follow the number with: cm to specify centimeters mm to specify millimeters px to specify pixels pt to specify points
Other values for the pagesize argument are supported for convenience. Examples are: legal (8.5 x 14), ledger (11 x 17), and executive (7.25 x 10.50).
Case is significant when specifying arguments to the -ps option. In many instances, upper-case arguments designate 90 degree rotated versions of the lower case arguments. For example, letter designates a page size of 8.5 x 11 inches, while Letter designates a page size of 11 x 8.5 inches. To view a complete list of all the supported values for the pagesize argument, use the -help option, or consult the Adobe ShowPS User Guide.
If you choose a page size too small for the current page, the effect is the same as if you used a paper size too small for a document you print. The program displays as much of the document as fits on the page but does not provide scroll bars. To view the whole page, choose a large enough page size, then scroll or scale the document as needed if it is larger than the window. Resource: pageSize (pre-scan size) 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 size 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 size characters of the file. If the identifier string is missing, the previewer displays a dialog box that asks whether to display the file anyway.
The size parameter may be followed by k for Kbytes and m for Mbytes. If size is greater than 100 Mbytes, an error message results. If size 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 is 8200, which allows for the common case where the header size is 8192 bytes. Resource: preScanSize (reposition EPS files) Encapsulated PostScript (EPS) files can contain images at an arbitrary location on the page. By default, the previewer aligns the upper left corner of the image with the upper left corner of the page. If the associated resource (repositionEPSF) has been changed to False, you can use the -repsf option to return to the default behavior. Resource: repositionEPSF (quiet fall back) When set, ShowPS falls back to unstructured mode if it cannot find %%Page comments in the PostScript file being viewed. When not set, a message window appears to alert the user that the file is not structured. Resource: quietFallback Sets a scale factor which applies to the page size and to the drawing on the page. The scale factor may be an integer or a floating point number. The default value for the scale factor is 1 (one). The legal range is 0.1 through 10.0. Resource: scale (substitute fonts) Substitutes Courier font if a document requires a font that is not available. You need this option only if you have changed the value of the substituteFonts resource to False. In that case, the previewer displays an error message if you try to load a file that requires unavailable fonts and the X server does not provide font substitution. A message explains why the previewer cannot load the file. Resource: substituteFonts (skip copyright) Skips the copyright notice that is usually displayed when you start the program. Resource: skipCopyright When the program reads from stdin, it temporarily stores the input from stdin in the directory specified by the tempDir resource (tmp by default) and later removes it. Use this option to specify a different directory for storing the input. Resource: tempDir (verbose) Prints a short message to stderr each time an error dialog box is displayed. This allows you to save error messages to a file for later inspection and debugging. Resource: verbose (watch progress) By default, the program writes a page to a pixmap and displays it only when it is complete. When you use the -wp option, the program displays parts of the page as it is being drawn. While the option lets you observe the progress of a display that requires lengthy preparation, the order in which chunks are displayed is not meaningful. Resource: watchProgress If you supply "-" instead of a filename, the program reads from stdin. In that case, the program temporarily stores the input from stdin in the directory specified by the tempDir resource and later removes it.
The "-" option makes it possible to view plain text files. Run the file through a program that generates PostScript language output and pipe the output to the previewer's stdin. Loads one or more files into the previewer at startup time.
 

DESCRIPTION

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.
 

DOCUMENT REQUIREMENTS

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.
 

STRUCTURED AND UNSTRUCTURED DOCUMENTS

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.


 

SPECIAL DOCUMENTS

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 repositionEPSF resource, the repsf option, or the Reposition EPS Files command in the Options menu to change this behavior.
 

EXCEEDING PIXMAP MEMORY

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 choose Reopen from the File menu and page forward to the information you want to see.
 

KEYBOARD ACCELERATORS


 

File Menu

Previous Alt/B Next Alt/F Open... Alt/O Reopen Alt/R Exit Alt/Q
 

Page Menu

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
 

Controls Menu

Interrupt Alt/I Continue Alt/C
 

View Menu

Shortcut Panel... Alt/c Scale Selection... Alt/s Page Orientation... Alt/o
 

PAGE SIZES

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)
 

EXAMPLES

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


 

FILES

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 .Xdefaults file.
 

RESOURCES

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.
 

Display PostScript NX X Resources

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.
 

BUGS

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


 

NOTES

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.
 

SEE ALSO

[1] O'Reilly & Assoc., The Definitive Guides to the X Window System, Vol. 0-7.

[2] Adobe Systems Incorporated, Programming the Display PostScript System with X (Addison-Wesley Publishing Co., 1993).

[3] Adobe Systems Incorporated, PostScript Language Reference Manual, Second Edition (Addison-Wesley Publishing Co., 1990).


 

Index

NAME
SYNOPSIS
OPTIONS
DESCRIPTION
DOCUMENT REQUIREMENTS
STRUCTURED AND UNSTRUCTURED DOCUMENTS
SPECIAL DOCUMENTS
EXCEEDING PIXMAP MEMORY
KEYBOARD ACCELERATORS
File Menu
Page Menu
Controls Menu
View Menu
PAGE SIZES
EXAMPLES
FILES
RESOURCES
Display PostScript NX X Resources
BUGS
NOTES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 02:43:03 GMT, October 02, 2010