GHOSTVIEW(1)

πŸ“¦ version 1.5, in opensuse-leap 16.0

πŸ¦‹ GHOSTVIEW(1) β€” like, the manual, but make it make sense πŸ¦‹

General Commands Manual Β· GHOSTVIEW(1) Β· yes bestie, you're in the right place πŸ’–


✨ NAME ✨

ghostview β€” view PostScript documents using ghostscript. That's the whole assignment. πŸ‘‘


🌸 SYNOPSIS 🌸

ghostview [filename]
or
ghostview [-monochrome] [-grayscale] [-color] [-[no]title] [-[no]date]
[-[no]locator] [-[no]labels] [-resolution dpi] [-dpi dpi] [-xdpi dpi]
[-ydpi dpi] [-magstep n] [-[no]safer] [-[no]quiet]
[-arguments arguments] [-[no]center] [-portrait] [-landscape]
[-upsidedown] [-seascape] [-[no]swap] [-letter] [-tabloid] [-ledger]
[-legal] [-statement] [-executive] [-a3] [-a4] [-a5] [-b4] [-b5]
[-folio] [-quarto] [-10x14] [-force] [-forceorientation] [-forcemedia]
[-[no]openwindows] [-[no]ncdwm] [-page label] [-toolkitoption ...]
[filename]

πŸ’œ DESCRIPTION πŸ’œ

okay so, ghostview is literally the X11 user interface for the ghostscript interpreter. The two of them are a whole duo β€” a collab, if you will. 🀝 ghostview creates the viewing window, and ghostscript does the actual drawing in it. Two cooperating programs, one iconic little setup.

And before you spiral at the number of options down there: don't be alarmed 😭 Generally you invoke ghostview with just one parameter β€” the name of the file you want to preview. That's it. That's the vibe.

Oh, and if the filename is -, ghostview will read from stdin. very demure, very stdin. πŸŽ€

The options are basically a way to set X resources from the command line for a single invocation of ghostview. Which is exactly why the discussion of the options is delayed until after the X resources are discussed β€” we're doing this in order, bestie, no skipping ahead. πŸ“‹


πŸŽ€ MAIN WINDOW πŸŽ€

Okay so the layout tour, because she has layers:

  • The main viewport? Right side of the main window. That's the main character. ⭐
  • If the page is bigger than the viewport, you get scroll bars along the bottom and right edges of the viewport.
  • To the left of the viewport is the table of contents. If the PostScript file has document structuring convention (DSC) comments, the table of contents will display the page labels (i.e. usually page numbers). Yes, the original really does say "table of context" there β€” we move past it, we don't dwell. πŸ™ˆ
  • To the left of the table of contents is the menu box. Each push button brings up a popup menu. push button supremacy. πŸ”˜

Over the menu box and table of contents there are three optional labels: title, date, and locator. Let's break them down:

  • The title label contains the document title found in the DSC comments. If no title can be found, the filename is used in its place. 🏷️
  • The date label contains the document date found in the DSC comments. If no date can be found, the last modified date of the file is used in its place. πŸ“…
  • Since the title and date labels may be clipped by the main viewport, the date and title labels are push buttons that bring up a popup window with the title or date. These popup windows also show the ``document'' icon when the displayed string comes from the DSC comments. cuteness overload ngl. πŸ“„βœ¨
  • The locator shows the location of the cursor in the viewport. The location is expressed in the default user coordinate system. It's useful for measuring bounding boxes β€” so like, actually useful, not just decorative. πŸ“

πŸ–±οΈ cursor lore (yes this gets its own subsection, it's important)

Within the main viewport, the mouse cursor is a target'' when ghostscript is doing work. The cursor is a cross hair'' when ghostscript is idle. So the cursor is essentially doing a vibe check on ghostscript at all times. 🎯

When moving to another page in a document, it is generally best to wait for ghostscript to become idle. Otherwise, the current ghostscript process must be killed and the overhead of reading the prologue is incurred again. 😭 so bestie... just wait. patience is free, killing the process is not.

Ghostview will check to see if the file has been modified just before it displays a page or when the application is deiconified. If the file has changed, it will reopen the file. lowkey thoughtful of her. 🫢


πŸ” the zoom window

Clicking anywhere within the viewport will popup a zoom window. The window is centered about the location that was clicked. And the mouse buttons are tiered, like a lil resolution menu:

  • First mouse button β†’ low resolution zoom window
  • Second mouse button β†’ medium resolution zoom window
  • Third mouse button β†’ high resolution zoom window πŸ”₯

The cursor in the zoom window will display a target'' or cross hair'' depending on the state of ghostscript β€” same energy as the main viewport, she's consistent. The locator reports the position of the cursor in the zoom windows as well as the main viewport. multitasking icon. πŸ’…


πŸ“– table of contents behaviour

In the table of contents, the first and third mouse button function exactly as they do in a Text widget. That is, the first mouse button selects text and the third mouse button extends selections. Classic. πŸ’–

But here's the slay: clicking on a page label with the second mouse button will cause that page to be shown. And the page being displayed is marked with a < in the right margin of the table of contents. that's the little indicator, she's telling you where you are. πŸ‘‘


There are several additional windows that may appear. Like, guests at the function. πŸŽ€

  • The copyright window will appear whenever copyright information is requested.
  • The information window appears whenever the ghostscript process writes to stdout'' or stderr''.

Whenever there is an error in the PostScript program, the stack trace will appear in this window. πŸ’€ When ghostscript is invoked without the quiet option, informational message regarding the state of ghostscript will appear in the information window.

Both the copyright and information windows can be dismissed by pushing the ``Dismiss'' button. bye bestie πŸ‘‹


πŸ“ the Select File dialog widget

The Select File dialog widget will appear when you wish to open or save a file. It allows an X11 user to select a file by typing the path or by browsing in directory listings and selecting entries with the mouse. both methods valid, pick your fighter. πŸ—‚οΈ

The space bar can be pressed to complete filenames, and tilde is used for home directories. All the usual key bindings can be used in the text widget, except for Return and Control-M, which are equivalent to pressing the OK button. ⚠️ important distinction, don't come for me.

The path can be scrolled using the large horizontal scroll bar, or by moving the insertion cursor in the text widget. The directory entries can be scrolled using the vertical scroll bars, or by holding a mouse button down and moving out of the listing. And the scrolling speed varies with the distance from the listing β€” she's got range. 🌈

The directory entries are terminated with special characters that show the type of entry, similar to the -F option of ls(1). iykyk. πŸ“

The Select File dialog widget is in total control until it pops down. No other controls in ghostview will be active during this time. it's HER moment, let her have it. main character energy, no interruptions. πŸ’…βœ¨

Okay so bestie, look at the menu box β€” there are five buttons up in there and they are, in order: File, Page, Magstep, Orientation, and Media. And the best part? Most of these popup menus have keyboard accelerators, so you can absolutely skip the mouse. Just please, please go read the keyboard accelerator section, okay? It's literally right there. πŸ™


πŸ’– File πŸ’–

This popup menu is your whole file-access situation. Everything you'd want to do with an actual file lives right here:

  • Open... β€” Pops up the Select File window so you can get ready to open a file. Heads up though: the Select File widget is in total control until it pops down β€” like, it's the main character, don't fight it. Then it opens the file for viewing. πŸ¦‹
  • Reopen β€” Reopens the current file. That's it. That's the whole vibe.
  • Print... β€” Pops up a dialog widget to ask you for the printer name, then sends the whole document to the printer. All of it. No skips.
  • Print marked pages... β€” Pops up a dialog widget to ask for the printer name, then sends just the marked pages to the printer. And here's the little detail nobody expects: if no pages have been marked, the mark procedure gets called before printing, and then the unmark procedure gets called after printing. Sneaky but iconic. πŸ’…
  • Save marked pages... β€” Pops up the Select File window so you can get ready to save a file. Again, the Select File widget is in total control until it pops down. It saves the marked pages into the selected file. Same deal as above: if no pages have been marked, the mark procedure is called before saving and then the unmark procedure is called after saving.
  • Copyright... β€” Pops up the copyright window. Gotta give credit where credit is due, periodt. πŸ‘‘
  • Quit β€” Causes ghostview to exit. Bye bestie! 🫢

🌸 Page 🌸

This popup menu handles all your page access needs, and it's genuinely so useful ngl:

  • Next β€” Display the next page. ➑️
  • Redisplay β€” Display the current page. Like a little refresh moment. ✨
  • Previous β€” Display the previous page. ⬅️
  • Center β€” Centers the page in the viewport. Aesthetic.
  • Mark β€” Marks the pages that have been selected in the table of contents. And if nothing's been selected? It just marks the current page instead. Lowkey considerate of it.
  • Unmark β€” Unmarks the pages that have been selected in the table of contents. And if no pages have been selected, it unmarks the current page. Symmetry, we love to see it.

πŸ”₯ Magstep πŸ”₯

The Magstep menu controls the magnification at which the document is viewed. Now, the default magstep of 0 implies no magnification β€” meaning the size on the screen should match the size on paper. Cute, right?

Ghostview borrows the whole notion of magstep from TeX, which is very "iykyk" of it. The magnification is defined as 1.2**magstep. So at magstep 1, the document is magnified by 1.2. At magstep -1, the document is reduced by 1.2. And the Magstep menu lists values from -5 to 5. Math class but make it slay. πŸ“


πŸ’… Orientation πŸ’…

The Orientation menu controls the display orientation. Here's how the whole dot-and-document thing works, because it's a whole system:

  • A ``dot'' appears in front of the current orientation. πŸ‘€
  • The first mouse button sets the default orientation.
  • But the DSC comments may specify an orientation of Portrait or Landscape that overrides the default. When that happens, a "document" appears in front of the current orientation.
  • The second mouse button can be used to ``force'' the orientation on a document, overriding those DSC comments.
  • And if an orientation is being forced, then a ``tie fighter'' will appear in front of the current orientation. Yes, seriously. A tie fighter. ⭐

The actual options:

  • Portrait β€” Set the orientation to Portrait. This implies no rotation. A portrait orientation indicates that the longest edge of the paper is parallel to the vertical (y) axis.
  • Landscape β€” Set the orientation to Landscape. This implies a clockwise rotation of the paper by 90 degrees. A landscape orientation indicates that the longest edge of the paper is parallel to the horizontal (x) axis.
  • Upside-down β€” Set the orientation to Upside-Down. Yeah. That one. πŸ™ƒ
  • Seascape β€” Set the orientation to Seascape. This implies a counterclockwise rotation of the paper by 90 degrees.
  • Swap Landscape β€” Swaps the meaning of Landscape and Seascape. So here's the tea: most of the Landscape documents that I have encountered require a 90 clockwise rotation of the paper to view. However β€” and this is important β€” there is no standard, and some documents need to be rotated the other way. The swap landscape button allows ghostview to automatically rotate the document the right way in response to the %%Orientation comment in the PostScript file. Iconic problem-solving fr fr. πŸ”₯

πŸ¦‹ Media πŸ¦‹

The entries on the Media menu set the page media. Same little visual language as orientation, so stay with me:

  • Media defined in the document appear at the beginning of the menu, separated by a line from the standard media.
  • A ``dot'' appears in front of the current media. πŸ‘€
  • The first mouse button sets the default media.
  • The DSC comments may specify the page media that overrides the default, and in this case a "document" appears in front of the current media.
  • The second mouse button can be used to ``force'' the media on a document to override the DSC comments.
  • And forcing the media on an EPSF figure will override the Bounding Box. Which is genuinely so handy β€” it makes it easy to view a figure with an incorrect %%BoundingBox comment. Huge. 🫢
  • If a media is being forced, then a ``tie fighter'' will appear in front of the current media. ⭐

Here are the standard media names and their sizes, bestie. The size is given as the width and height in PostScript points:

Letter          612 x  792    (8.5 x 11  in.)
Tabloid         792 x 1224    (11  x 17  in.)
Ledger         1224 x  792    (17  x 11  in.)
Legal           612 x 1008    (8.5 x 14  in.)
Statement       396 x  612    (5.5 x 8.5 in.)
Executive       540 x  720    (7.5 x 10  in.)
A3              842 x 1190
A4              595 x  842
A5              420 x  595
B4              729 x 1032
B5              516 x  729
Folio           612 x  936    (8.5 x 13  in.)
Quarto          610 x  780
10x14           720 x 1008    (10  x 14  in.)

Like, look at that list. Letter, Tabloid, Ledger, Legal, Statement, Executive, A3, A4, A5, B4, B5, Folio, Quarto, and 10x14. Every single one accounted for, no notes. 🌈

⌨️ KEYBOARD ACCELERATORS ⌨️

okay so here's the tea β˜• β€” most of the popup menu commands have a keyboard twin, so you can flex without ever touching the mouse. but there's a vibe check: the popup menu entry must be sensitive (i.e. not grayed out) for the action to actually do anything. Grayed out = no cap, nothing happens πŸ™ˆ

Here's the default keyboard binding, bestie β€” screenshots encouraged πŸ’…

  • Q β€” bound to GhostviewQuit(), which is equivalent to pushing the Quit menu button on the Ghostview menu.
  • O β€” bound to GhostviewOpen(), which is equivalent to pushing the Open... menu button on the File menu.
  • R β€” bound to GhostviewReopen(), which is equivalent to pushing the Reopen menu button on the File menu.
  • S β€” bound to GhostviewSave(), which is equivalent to pushing the Save marked pages... menu button on the File menu.
  • P β€” bound to GhostviewPrintMarked(), which is equivalent to pushing the Print marked pages... menu button on the File menu.
  • Shift-P β€” bound to GhostviewPrintWhole(), which is equivalent to pushing the Print... menu button on the File menu.
  • BackSpace, Delete, Prior, B β€” bound to GhostviewPrevious(), which is equivalent to pushing the Previous menu button on the Page menu.
  • space, Return, Next, F β€” bound to GhostviewNext(), which is equivalent to pushing the Next menu button on the Page menu.
  • period, Ctrl-L β€” bound to GhostviewShow(), which is equivalent to pushing the Redisplay menu button on the Page menu.
  • M β€” bound to GhostviewMark(), which is equivalent to pushing the Mark menu button on the Page menu.
  • N β€” bound to GhostviewUnMark(), which is equivalent to pushing the Unmark menu button on the Page menu.

now the magstep girlies ✨ β€” literally one key per step, it's giving number pad energy:

  • 0 β€” bound to GhostviewMagstep(0), which is equivalent to pushing the 0 menu button on the Magstep menu.
  • 1 β€” bound to GhostviewMagstep(1), which is equivalent to pushing the 1 menu button on the Magstep menu.
  • 2 β€” bound to GhostviewMagstep(2), which is equivalent to pushing the 2 menu button on the Magstep menu.
  • 3 β€” bound to GhostviewMagstep(3), which is equivalent to pushing the 3 menu button on the Magstep menu.
  • 4 β€” bound to GhostviewMagstep(4), which is equivalent to pushing the 4 menu button on the Magstep menu.
  • 5 β€” bound to GhostviewMagstep(5), which is equivalent to pushing the 5 menu button on the Magstep menu.
  • + β€” bound to GhostviewIncreaseMagstep(), which increases the magstep by 1.
  • - β€” bound to GhostviewDecreaseMagstep(), which decreases the magstep by 1.

scrolling keys, because zooming in and then losing your place is so not the move 😭🫢

  • U β€” bound to GhostviewUp(), which scrolls the main viewport up.
  • D β€” bound to GhostviewDown(), which scrolls the main viewport down.
  • H β€” bound to GhostviewLeft(), which scrolls the main viewport left.
  • J β€” bound to GhostviewDown(), which scrolls the main viewport down.
  • K β€” bound to GhostviewUp(), which scrolls the main viewport up.
  • L β€” bound to GhostviewRight(), which scrolls the main viewport right.
ngl, J/K being the same as D/U is a whole mood β€” that's exactly how the page says it, so I'm not gonna gaslight you and pretend it's different πŸ’€

and now the arrow keys πŸ‘‘ where orientation lives. plain arrows = default, Shift + arrow = forced, that's the whole lore:

  • Up (arrow) β€” bound to GhostviewDefault() GhostviewSetOrientation(portrait), which is equivalent to pushing Portrait with the first mouse button on the Orientation menu.
  • Right (arrow) β€” bound to GhostviewDefault() GhostviewSetOrientation(landscape), which is equivalent to pushing Landscape with the first mouse button on the Orientation menu.
  • Down (arrow) β€” bound to GhostviewDefault() GhostviewSetOrientation(upside-down), which is equivalent to pushing Upside-down with the first mouse button on the Orientation menu.
  • Left (arrow) β€” bound to GhostviewDefault() GhostviewSetOrientation(seascape), which is equivalent to pushing Seascape with the first mouse button on the Orientation menu.
  • Shift-Up (arrow) β€” bound to GhostviewForce() GhostviewSetOrientation(portrait), which is equivalent to pushing Portrait with the second mouse button on the Orientation menu.
  • Shift-Right (arrow) β€” bound to GhostviewForce() GhostviewSetOrientation(landscape), which is equivalent to pushing Landscape with the second mouse button on the Orientation menu.
  • Shift-Down (arrow) β€” bound to GhostviewForce() GhostviewSetOrientation(upside-down), which is equivalent to pushing Upside-down with the second mouse button on the Orientation menu.
  • Shift-Left (arrow) β€” bound to GhostviewForce() GhostviewSetOrientation(seascape), which is equivalent to pushing Seascape with the second mouse button on the Orientation menu.

🎬 ACTIONS 🎬

same energy, different lane πŸ¦‹ β€” most of the popup menu commands have an equivalent action that you can drop into a translation. and yeah, same rule applies: the popup menu entry must be sensitive (i.e. not grayed out) or the action does absolutely nothing. periodt πŸ’…

here's the full list of actions, no skips, no cuts:

  • GhostviewCopyright() β€” equivalent to pushing the Copyright... menu button on the Ghostview menu.
  • GhostviewQuit() β€” equivalent to pushing the Quit menu button on the Ghostview menu.
  • GhostviewOpen() β€” equivalent to pushing the Open... menu button on the File menu.
  • GhostviewReopen() β€” equivalent to pushing the Reopen menu button on the File menu.
  • GhostviewSave() β€” equivalent to pushing the Save marked pages... menu button on the File menu.
  • GhostviewPrintWhole() β€” equivalent to pushing the Print... menu button on the File menu.
  • GhostviewPrintMarked() β€” equivalent to pushing the Print marked pages... menu button on the File menu.
  • GhostviewPrevious() β€” equivalent to pushing the Previous menu button on the Page menu.
  • GhostviewShow() β€” equivalent to pushing the Redisplay menu button on the Page menu.
  • GhostviewNext() β€” equivalent to pushing the Next menu button on the Page menu.
  • GhostviewCenter() β€” equivalent to pushing the Center menu button on the Page menu.
  • GhostviewMark() β€” equivalent to pushing the Mark menu button on the Page menu.
  • GhostviewUnmark() β€” equivalent to pushing the Unmark menu button on the Page menu.
  • GhostviewSetMagstep(magstep) β€” sets the magstep. the parameter must be an integer πŸ”’.
  • GhostviewIncreaseMagstep() β€” increases magstep by one.
  • GhostviewDecreaseMagstep() β€” decreases magstep by one.
  • GhostviewSetOrientation(orientation) β€” set the orientation to the passed parameter. that parameter must be portrait, landscape, upside-down, or seascape 🧭.
  • GhostviewSwapLandscape() β€” equivalent to pushing the Swap Landscape menu button on the Orientation menu.
  • GhostviewSetPageMedia(media-name) β€” sets the media. the parameter should be either a media defined in the document or a standard media πŸ“„.
  • GhostviewDefault() β€” the orientation or media being set is not forced on the document. this action is called before the action that sets the orientation or media. iykyk 🫢
  • GhostviewForce() β€” the orientation or media being set is forced on the document. this action is called before the action that sets the orientation or media. (yes, it's the bolder sibling of GhostviewDefault() πŸ”₯)
  • GhostviewDeleteWindow() β€” destroy the current window. this provides a way to implement the Delete Window protocol for window managers πŸͺŸπŸ’€.
  • GhostviewDismiss() β€” pop down the current window. this provides a way to implement the Delete Window protocol for window managers.
  • GhostviewScrollUp() β€” scroll the main viewport up.
  • GhostviewScrollDown() β€” scroll the main viewport down.
  • GhostviewScrollLeft() β€” scroll the main viewport left.
  • GhostviewScrollRight() β€” scroll the main viewport right.
  • GhostviewEraseLocator() β€” used to erase the locator when leaving a Ghostview widget 🎯.
  • GhostviewCheckFile() β€” checks to see if the file changed and refreshes the screen if necessary πŸ”„.
heads up bestie: GhostviewDeleteWindow() literally destroys the window β€” that's not a cute little hide, that's the whole thing gone. GhostviewDismiss() is the pop-it-down one. pick your fighter πŸ’…

πŸ’– APPLICATION RESOURCES πŸ’–

Okay bestie, these are the app-level resources you can set to control ghostview's default behavior. Total "set it once and live your truth" energy ✨

  • showTitle (class Labels) β€” tells whether to display the %%Title comment. Default is true.
  • showDate (class Labels) β€” tells whether to display the %%Data comment. Default is true.
  • showLocator (class Labels) β€” tells whether to display the locator. Default is true.
  • autoCenter (class AutoCenter) β€” tells whether to center the page inside the viewport whenever the page size changes. Default is true.
  • horizonalMargin (class Margin) β€” tells how many pixels ghostview should reserve for window decorations in the horizontal direction. Default is 20.
  • verticalMargin (class Margin) β€” tells how many pixels ghostview should reserve for window decorations in the vertical direction. Default is 44.
  • minimumMagstep (class Magstep) β€” tells the smallest magstep to display. Default is -5.
  • maximumMagstep (class Magstep) β€” tells the largest magstep to display. Default is 5.
  • magstep (class Magstep) β€” sets the default magstep. Default is 0.
  • orientation (class Orientation) β€” sets the default orientation. Default is Portrait.
  • page (class Page) β€” gives the initial page to display. This resource only affects the display of the file listed on the command line. Default is NULL.
  • pageMedia (class PageMedia) β€” sets the default page media. Default is Letter.
  • forceOrientation (class Force) β€” tells whether to force the orientation on the document. Default is false.
  • forcePageMedia (class Force) β€” tells whether to force the page media on the document. Default is false.
  • swapLandscape (class SwapLandscape) β€” tells whether to swap the meaning of Landscape and Seascape. Default is false.
  • printCommand (class PrintCommand) β€” sets the command used for printing. The printer environment variable is set to the desired printer, and then this command is executed using popen. This command should read from stdin and send the file to the appropriate printer. Default is lpr for BSD and lp for System V.
  • printerVariable (class PrinterVariable) β€” gives the name of the printer environment variable. Default is PRINTER for BSD and LPDEST for System V.
  • defaultPrinter (class DefaultPrinter) β€” gives the printer name to use when the printer environment variable is not set. Default is NULL.
  • printPrompt (class PrintPrompt) β€” sets the prompt used to ask for the printer name. Default is Printer Name: .
  • printFail (class printFail) β€” sets the string used to inform the user that the printer command failed. Default is "lpr" command failed..
  • openPrompt (class OpenPrompt) β€” sets the prompt used to ask for a file name to open. Default is Open File: .
  • openFail (class OpenFail) β€” sets the string used to inform the user that the open failed. Default is Cannot open file: .
  • savePrompt (class SavePrompt) β€” sets the prompt used to ask for a file name to save. Default is Save File: .
  • saveFail (class SaveFail) β€” sets the string used to inform the user that the save failed. Default is Cannot save file: .
  • openWindows (class OpenWindows) β€” OpenWindows servers sometimes cause error messages about bitmaps not being 1 bit deep. Turning on this resource avoids the problem by not using any bitmaps. You lose the functionality of having the current magstep, orientation and media marked on the popup menus. Default is false.
  • ncdwm (class Ncdwm) β€” the Xt Intrinsics has a bug that causes bogus information in the window manager size hints. Ncdwm and possibly other window managers get confused by the bogus information and make the window extremely small. Twm and mwm ignore the bogus information. Turning on the resource avoids the problem with ncdwm by doing things slightly differently. However, this can confuse other window managers such as mwm. This bug is fixed in X11R5 fix-10. You should only set this resource if you have the problem. Default is false.

πŸ¦‹ GHOSTVIEW WIDGET RESOURCES πŸ¦‹

Some resources in the Ghostview widget can be set by you, bestie. These selected ones are below πŸ‘‘

  • arguments (class Arguments) β€” additional arguments passed to the interpreter. It is convenient to name files that preload fonts here for PostScript programs that continually reload fonts while rendering a page. Default is no additional arguments.
  • busyCursor (class Cursor) β€” the cursor shown when ghostscript is rendering to the window. The busy cursor is set to the target by the application defaults.
  • cursor (class Cursor) β€” the cursor shown when ghostscript is idle. Default cursor is crosshair.
  • interpreter (class Interpreter) β€” the name of the executable to call to render the PostScript. It is convenient to set this resource to the path of an alternate version of ghostscript for testing. Default is gs.
  • palette (class Palette) β€” tells ghostscript how to restrict the palette used when rendering. Possible values are color, grayscale, and monochrome. Default is color.
  • quiet (class Quiet) β€” tells ghostscript whether to suppress informational messages. Default is true.
  • safer (class Safer) β€” tells ghostscript whether to run in safer mode. Default is true.
  • useBackingPixmap (class UseBackingPixmap) β€” tells whether to use a backing pixmap. If this resource is false, backing store is requested on the Ghostview window. Some X servers have limited resources for large pixmaps. Also, some X servers' backing store is much faster than using a backing pixmap. You should reset this resource if your X server is one of the server types mentioned. Default is true.
  • xdpi (class Resolution) β€” sets the X resolution of the window in dots per inch. You can use this resource to affect the main window. Zoom windows have their X dpi set explicitly in the program. Default is calculated from the screen metrics.
  • ydpi (class Resolution) β€” sets the Y resolution of the window in dots per inch. You can use this resource to affect the main window. Zoom windows have their Y dpi set explicitly in the program. Default is calculated from the screen metrics.

✨ GHOSTVIEW WIDGET ACTIONS ✨

  • notify(width height xdpi ydpi) β€” the notify event is used by the ghostview application for the locator and popup zoom windows. If width and height are 0, the event is used for the locator. Otherwise, it triggers a popup zoom window. Default width and height are 72. Default xdpi and ydpi are 300. The height will default to the width if the height is omitted. The xdpi will default to the xdpi if the ydpi is omitted.

πŸ’… OPTIONS πŸ’…

Okay bestie, this is the part where ghostview lets you skip the whole "click around the GUI like a little gremlin" thing and just set everything from the command line. Every single one of these flags is honestly just a fancy way of writing a resource line β€” that's it, that's the whole tea 🍡. So each bullet is like "this flag = this exact resource setting," no cap.

  • -monochrome β€” literally the same as setting *Ghostview.palette: Monochrome.
  • -grayscale β€” literally the same as setting *Ghostview.palette: GrayScale.
  • -color β€” literally the same as setting *Ghostview.palette: Color.
  • -title β€” literally the same as setting Ghostview.showTitle: True.
  • -notitle β€” literally the same as setting Ghostview.showTitle: False.
  • -date β€” literally the same as setting Ghostview.showDate: True.
  • -nodate β€” literally the same as setting Ghostview.showDate: False.
  • -locator β€” literally the same as setting Ghostview.showLocator: True.
  • -nolocator β€” literally the same as setting Ghostview.showLocator: False.
  • -labels β€” literally the same as setting Ghostview.Labels: True.
  • -nolabels β€” literally the same as setting Ghostview.Labels: False.
  • -resolution dpi β€” literally the same as setting *Ghostview.Resolution: dpi.
  • -dpi dpi β€” literally the same as setting *Ghostview.Resolution: dpi. (yes, twin sister of -resolution, they're matching πŸŽ€)
  • -xdpi dpi β€” literally the same as setting *Ghostview.xdpi: dpi.
  • -ydpi dpi β€” literally the same as setting *Ghostview.ydpi: dpi.
  • -magstep magstep β€” literally the same as setting Ghostview.magstep: magstep.
  • -safer β€” literally the same as setting *Ghostview.safer: True.
  • -nosafer β€” literally the same as setting *Ghostview.safer: False.
  • -quiet β€” literally the same as setting *Ghostview.quiet: True.
  • -noquiet β€” literally the same as setting *Ghostview.quiet: False.
  • -arguments arguments β€” literally the same as setting *Ghostview.arguments: arguments.
  • -center β€” literally the same as setting Ghostview.autoCenter: True.
  • -nocenter β€” literally the same as setting Ghostview.autoCenter: False.
  • -portrait β€” literally the same as setting Ghostview.orientation: Portrait.
  • -landscape β€” literally the same as setting Ghostview.orientation: Landscape.
  • -upsidedown β€” literally the same as setting Ghostview.orientation: Upside-down.
  • -seascape β€” literally the same as setting Ghostview.orientation: Seascape.
  • -swap β€” literally the same as setting Ghostview.swapLandscape: True.
  • -noswap β€” literally the same as setting Ghostview.swapLandscape: False.
  • -letter β€” literally the same as setting Ghostview.pageMedia: Letter.
  • -tabloid β€” literally the same as setting Ghostview.pageMedia: Tabloid.
  • -ledger β€” literally the same as setting Ghostview.pageMedia: Ledger.
  • -legal β€” literally the same as setting Ghostview.pageMedia: Legal.
  • -statement β€” literally the same as setting Ghostview.pageMedia: Statement.
  • -executive β€” literally the same as setting Ghostview.pageMedia: Executive.
  • -a3 β€” literally the same as setting Ghostview.pageMedia: A3.
  • -a4 β€” literally the same as setting Ghostview.pageMedia: A4.
  • -a5 β€” literally the same as setting Ghostview.pageMedia: A5.
  • -b4 β€” literally the same as setting Ghostview.pageMedia: B4.
  • -b5 β€” literally the same as setting Ghostview.pageMedia: B5.
  • -folio β€” literally the same as setting Ghostview.pageMedia: Folio.
  • -quarto β€” literally the same as setting Ghostview.pageMedia: Quarto.
  • -10x14 β€” literally the same as setting Ghostview.pageMedia: 10x14.
  • -force β€” literally the same as setting Ghostview.Force: True.
  • -forceorientation β€” literally the same as setting Ghostview.forceOrientation: True.
  • -forcemedia β€” literally the same as setting Ghostview.forcePageMedia: True.
  • -openwindows β€” literally the same as setting Ghostview.openWindows: True.
  • -noopenwindows β€” literally the same as setting Ghostview.openWindows: False.
  • -ncdwm β€” literally the same as setting Ghostview.ncdwm: True.
  • -noncdwm β€” literally the same as setting Ghostview.ncdwm: False.
  • -page label β€” literally the same as setting Ghostview.page: label.

🧚 WIDGET HIERARCHY 🧚

Okay so this next bit is the whole family tree of the ghostview application, and it's giving "screenshot from a group chat of everyone's contact names." Every widget, nested inside its parent, in order. Don't lose a single one, they all matter πŸ‘‘

The hierarchy of the ghostview application:

Ghostview  ghostview
     Form  form
          MenuButton  titleButton
               SimpleMenu  menu
                    SmeBSB  title
          MenuButton  dateButton
               SimpleMenu  menu
                    SmeBSB  date
          Label  locator
          Box  box
               MenuButton  fileButton
                    SimpleMenu  menu
                         SmeBSB  open
                         SmeBSB  reopen
                         SmeBSB  printwhole
                         SmeBSB  printmarked
                         SmeBSB  save
                         SmeLine  line
                         SmeBSB  copyright
                         SmeBSB  quit
               MenuButton  pageButton
                    SimpleMenu  menu
                         SmeBSB  next
                         SmeBSB  show
                         SmeBSB  prev
                         SmeLine  line
                         SmeBSB  center
                         SmeLine  line
                         SmeBSB  mark
                         SmeBSB  unmark
               MenuButton  magstepButton
                    SimpleMenu  menu
                         SmeBSB  -5
                         SmeBSB  -4
                         SmeBSB  -3
                         SmeBSB  -2
                         SmeBSB  -1
                         SmeBSB  0
                         SmeBSB  1
                         SmeBSB  2
                         SmeBSB  3
                         SmeBSB  4
                         SmeBSB  5
               MenuButton  orientationButton
                    SimpleMenu  menu
                         SmeBSB  portrait
                         SmeBSB  landscape
                         SmeBSB  upsidedown
                         SmeBSB  seascape
                         SmeLine  line
                         SmeBSB  swap
               MenuButton  pagemediaButton
                    SimpleMenu  menu
                         SmeBSB  Letter
                         SmeBSB  Tabloid
                         SmeBSB  Ledger
                         SmeBSB  Legal
                         SmeBSB  Statement
                         SmeBSB  Executive
                         SmeBSB  A3
                         SmeBSB  A4
                         SmeBSB  A5
                         SmeBSB  B4
                         SmeBSB  B5
                         SmeBSB  Folio
                         SmeBSB  Quarto
                         SmeBSB  10x14
          Text  toc
          Viewport  pageview
               Core  clip
               Ghostview  page
               Scrollbar  horizontal
               Scrollbar  vertical
     TopLevelShell  information
          Form  form
               Text  text
               Command  dismiss
     TopLevelShell  copyright
          Form  form
               Text  text
               Command  dismiss
     TransientShell  popup
          Form  dialog
               Label  prompt
               Text  response
               Command  okay
               Command  cancel
     TopLevelShell  zoom
          Form  form
               Ghostview  page
               Command  dismiss

And here's the family tree of the Select File dialog box β€” different tree, same energy πŸ¦‹

The hierarchy of the Select File dialog box:

TransientShell  selFile
     Form  selFileForm
          Label  selFilePrompt
          Text  selFileField
          Scrollbar  selFileHScroll
          Composite  selFileList1
               Scrollbar  selFileVScroll
               Scrollbar  selFileHScroll
          Composite  selFileList2
               Scrollbar  selFileVScroll
               Scrollbar  selFileHScroll
          Composite  selFileList3
               Scrollbar  selFileVScroll
               Scrollbar  selFileHScroll
          Command  selFileOK
          Command  selFileCancel

🌈 ENVIRONMENT 🌈

Two environment variables, that's the whole vibe check here. They both do the exact same job, they just come from different Unix traditions bestie, so pick your fighter πŸ₯Š

  • LPDEST β€” this one gives the default printer destination on System V. System V girlies, this is your moment.
  • PRINTER β€” this one gives the default printer destination on BSD. BSD besties, you get your own ✨

😭 LIMITATIONS 😭

Okay so, real talk. If the document doesn't begin with %!PS-Adobe-, then it's not even claiming conformance to the document structuring convention. Like, it's not even trying πŸ’€. When ghostview runs into one of these documents, its functionality is limited β€” and by limited I mean all you get is scroll bars and a next page capability. That's it. That's the whole feature set for those files.

And because there's no table of contents in those documents, skipping around the document and marking pages is impossible. Not difficult. Impossible. So don't come for her about it πŸ™ˆ

Also: if there is no table of contents for the document, the popup zoom window will always show the first page. Every single time. First page forever. That's just how it is.


πŸ’€ BUGS πŸ’€

If you find a bug, please send a bug report to ghostview@cs.wisc.edu. Be nice about it, she's doing her best 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Copyright (C) 1992 Timothy O. Theisen

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

And here's the whole contact card, laid out like the icon he is πŸ’…

Author:   Tim Theisen         Systems Programmer
Internet: tim@cs.wisc.edu     Department of Computer Sciences
UUCP:     uwvax!tim           University of Wisconsin-Madison
Phone:    (608)262-0438       1210 West Dayton Street
FAX:      (608)262-9777       Madison, WI   53706

🌸 ACKNOWLEDGEMENTS 🌸

Okay so the Select File widget comes with a whole copyright notice attached, and bestie, legal text is sacred β€” we do not paraphrase it. It's giving very official, very "do not edit me" energy, so here it is exactly πŸ‘‡

Copyright 1989 Software Research Associates, Inc., Tokyo, Japan

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Software Research
Associates not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.
Software Research Associates makes no representations about the
suitability of this software for any purpose.  It is provided "as is"
without express or implied warranty.

SOFTWARE RESEARCH ASSOCIATES DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL SOFTWARE RESEARCH ASSOCIATES BE LIABLE FOR
ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

And the author credits, also verbatim because we respect the icon who wrote this 🫢

Author:   Erik M. van der Poel
          Software Research Associates, Inc., Tokyo, Japan
          erik@sra.co.jp

Like, the all-caps disclaimer is not a vibe check β€” it's the serious part: no express or implied warranty, and no liability for all those special, indirect, consequential, or whatsoever damages. Periodt. πŸ’…


That's the whole page, bestie β€” the footer sign-off is GHOSTVIEW(1), with the source/version and date stamp living in that same footer lane. Go peek at your build's footer for the exact official stamp. πŸ’–βœ¨

πŸ“¦ where this page comes from