PAGE(1)

πŸ“¦
version 0_git20260208 Β· 2 versions
, in alpine 3.24, arch rolling, nixos 26.05, nixpkgs unstable

πŸ’– PAGE(1) β€” General Commands Manual πŸ’–

okay bestie, this is the PAGE(1) manual from the General Commands Manual, and we're about to make it make sense. No cap. πŸ’…

✨ NAME ✨

page β€” view FAX, image, graphic, PostScript, PDF, and typesetter output files. πŸ–ΌοΈπŸ“„

🌸 SYNOPSIS 🌸

page [ -abirPRvVw ] [ -p ppi ] [ file...  ]

πŸ¦‹ DESCRIPTION πŸ¦‹

page is a general purpose document viewer, and she's lowkey everywhere. She can display the individual pages of a PostScript, PDF, or troff(1) or Unix's tex(1) device-independent output file. troff or tex output is simply converted to PostScript in order to be viewed. She can also view any number of graphics files β€” such as a FAX page, a Plan 9 image(7) file, an Inferno bitmap file, or other common format β€” and she displays these in sequence. In the absence of named files, page reads one from standard input. 🫢

By default, page runs in the window in which it is started and leaves the window unchanged. The -R option causes page to grow the window if necessary to display the page being viewed. The -w option causes page to create a new window for itself. The newly created window will grow as under the -R option. If being used to display multipage documents, only one file may be specified on the command line. 🚨

The -p option sets the resolution for PostScript and PDF files, in pixels per inch. The default is 100 ppi. The -r option reverses the order in which pages are displayed. ✨

When viewing a document, page will try to guess the true bounding box, usually rounding up from the file's bounding box to 8Β½Γ—11 or A4 size. The -b option causes it to respect the bounding box given in the file. As a more general problem, some PostScript files claim to conform to Adobe's Document Structuring Conventions but do not. The -P option enables a slightly slower and slightly more skeptical version of the PostScript processing code. Unfortunately, there are PostScript documents that can only be viewed with the -P option, and there are PostScript documents that can only be viewed without it. 😭

When viewing images with page, it listens to the image plumbing channel (see plumber(4)) for more images to display. The -i option causes page to not load any graphics files nor to read from standard input but rather to listen for ones to load from the plumbing channel. πŸ‘€

The -v option turns on extra debugging output, and the -V option turns on even more debugging output. The -a option causes page to call Unix's abort(3) rather than exit cleanly on errors, to facilitate debugging. πŸ”₯

Pressing and holding button 1 permits panning about the page. πŸ–±οΈ

Button 2 raises a menu of operations on the current image or the entire set. The image transformations are non-destructive and are valid only for the currently displayed image. They are lost as soon as another image is displayed. The button 2 menu operations are:

  • Orig size β€” restores the image to the original. All modifications are lost.
  • Zoom β€” prompts the user to sweep a rectangle on the image which is expanded proportionally to the rectangle.
  • Fit window β€” resizes the image so that it fits in the current window.
  • Rotate 90 β€” rotates the image 90 degrees clockwise.
  • Upside down β€” toggles whether images are displayed upside-down.
  • Next β€” displays the next page.
  • Prev β€” displays the previous page.
  • Zerox β€” displays the current image in a new page window. Useful for selecting important pages from large documents.
  • Reverse β€” reverses the order in which pages are displayed.
  • Write β€” writes the image to file.

Button 3 raises a menu of the pages to be selected for viewing in any order. πŸ“š

Typing a q or control-D exits the program. Typing a u toggles whether images are displayed upside-down. (This is useful in the common case of mistransmitted upside-down faxes.) Typing a r reverses the order in which pages are displayed. Typing a w will write the currently viewed page to a new file as a compressed image(7) file. When possible, the filename is of the form basename.pagenum.bit. Typing a d removes an image from the working set. ⌨️

To go to a specific page, one can type its number followed by enter. Typing left arrow, backspace, or minus displays the previous page. Typing right arrow, space, or enter displays the next page. The up and down arrow pan up and down one half screen height, changing pages when panning off the top or bottom of the page. 🧭

page calls Unix's gs(1) to draw each page of PostScript and PDF files. It also calls a variety of conversion programs, such as those described in jpg(1), to convert the various raster graphics formats into Inferno bitmap files. Pages are converted β€œon the fly,” as needed. ⚑

πŸŽ€ EXAMPLES πŸŽ€

🐯 Display a color PostScript file

page /sys/src/cmd/gs/examples/tiger.eps

Display a color PostScript file.

🌈 Browse the Inferno bitmap library

page /usr/inferno/icons/*.bit

Browse the Inferno bitmap library.

πŸ“– Preview this manual in a new window

man -t page | page -w

Preview this manual in a new window.

🌟 SEE ALSO 🌟

πŸ“ SOURCE πŸ“

/src/cmd/page

πŸ’€ DIAGNOSTICS πŸ’€

The mouse cursor changes to an arrow and ellipsis when page is reading or writing a file. πŸ–±οΈβœ¨

πŸ™ˆ BUGS πŸ™ˆ

page supports reading of only one document file at a time, and the user interface is clumsy when viewing very large documents. 😭

When viewing multipage PostScript files that do not contain %%Page comments, the button 3 menu only contains this page and next page: correctly determining page boundaries in Postscript code is not computable in the general case. πŸ’€

If page has trouble viewing a Postscript file, it might not be exactly conforming: try viewing it with the -P option. πŸ™ˆ

The interface to the plumber is unsatisfactory. In particular, document references cannot be sent via plumbing messages. 🚰

There are too many keyboard commands and menu items. πŸ’…

Displaying a PostScript or PDF file depends both on having GhostScript (see gs(1)) installed and on the underlying operating system providing a file descriptor device tree at /dev/fd. πŸ‘»

Some FreeBSD installations do not provide file descriptors greater than 2 in /dev/fd. To fix this, add

/fdescfs    /dev/fd    fdescfs    rw    0    0

to /etc/fstab, and then mount /dev/fd. (Adding the line to fstab ensures causes FreeBSD to mount the file system automatically at boot time.) πŸ› οΈ


That's the whole PAGE(1) manual, source /src/cmd/page β€” no version or date shown on this page, just vibes. bye bestie πŸ’–βœ¨