plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

page.1 (6395B)


      1 .TH PAGE 1
      2 .SH NAME
      3 page \- view
      4 FAX,
      5 image, graphic, PostScript, PDF, and
      6 typesetter output
      7 files
      8 .SH SYNOPSIS
      9 .B page
     10 [
     11 .B -abirPRvVw
     12 ]
     13 [
     14 .B -p
     15 .I ppi
     16 ]
     17 [
     18 .IR file ...
     19 ]
     20 .SH DESCRIPTION
     21 .I Page
     22 is a general purpose document viewer.
     23 It can be used to display the individual pages
     24 of a
     25 PostScript,
     26 PDF,
     27 or
     28 .MR troff (1)
     29 or
     30 Unix's
     31 .IR tex (1)
     32 device-independent output
     33 file.
     34 .I Troff
     35 or
     36 .I tex
     37 output is simply converted to PostScript in order to be viewed.
     38 It can also be used to view any number of
     39 graphics files
     40 (such as a
     41 FAX
     42 page,
     43 a Plan 9
     44 .MR image (7)
     45 file, an Inferno bitmap file, or other common format).
     46 .I Page
     47 displays these
     48 in sequence.
     49 In the absence of named files,
     50 .I page
     51 reads one from standard input.
     52 .PP
     53 By default,
     54 .I page
     55 runs in the window in which it is started
     56 and leaves the window unchanged.
     57 The
     58 .B -R
     59 option causes
     60 .I page
     61 to grow the window if necessary
     62 to display the page being viewed.
     63 The
     64 .B -w
     65 option causes
     66 .I page
     67 to create a new window for itself.
     68 The newly created window will grow as under the
     69 .B -R
     70 option.
     71 If being used to display
     72 multipage documents,
     73 only one file may be specified on the command line.
     74 .PP
     75 The
     76 .B -p
     77 option sets the resolution for PostScript and PDF
     78 files, in pixels per inch.
     79 The default is 100 ppi.
     80 The
     81 .B -r
     82 option reverses the order in which pages are displayed.
     83 .PP
     84 When viewing a document,
     85 .I page
     86 will try to guess the true bounding box, usually rounding up from
     87 the file's bounding box to
     88 8½×11 or A4 size.
     89 The
     90 .B -b
     91 option causes it to respect the bounding box given in the file.
     92 As a more general problem,
     93 some PostScript files claim to conform to Adobe's
     94 Document Structuring Conventions but do not.
     95 The
     96 .B -P
     97 option enables a slightly slower and slightly more
     98 skeptical version of the PostScript processing code.
     99 Unfortunately, there are PostScript documents
    100 that can only be viewed with the
    101 .B -P
    102 option, and there are PostScript documents that
    103 can only be viewed without it.
    104 .PP
    105 When viewing images with
    106 .IR page ,
    107 it listens to the
    108 .B image
    109 plumbing channel
    110 (see
    111 .MR plumber (4) )
    112 for more images to display.
    113 The
    114 .B -i
    115 option causes
    116 .I page
    117 to not load any graphics files nor to read
    118 from standard input but rather to listen
    119 for ones to load from the plumbing channel.
    120 .PP
    121 The
    122 .B -v
    123 option turns on extra debugging output, and
    124 the
    125 .B -V
    126 option turns on even more debugging output.
    127 The
    128 .B -a
    129 option causes
    130 .I page
    131 to call
    132 Unix's
    133 .IR abort (3)
    134 rather than exit cleanly on errors,
    135 to facilitate debugging.
    136 .PP
    137 Pressing and holding button 1 permits panning about the page.
    138 .PP
    139 Button 2 raises a menu of operations on the current image or the
    140 entire set.  The image transformations are non-destructive and are
    141 valid only for the currently displayed image.  They are lost as soon
    142 as another image is displayed.
    143 The button 2 menu operations are:
    144 .TF Resize
    145 .TP
    146 .B Orig size
    147 Restores the image to the original. All modifications are lost.
    148 .TP
    149 .B Zoom
    150 Prompts the user to sweep a rectangle on the image which is
    151 expanded proportionally to the rectangle.
    152 .TP
    153 .B Fit window
    154 Resizes the image so that it fits in the current window.
    155 .TP
    156 .B Rotate 90
    157 Rotates the image 90 degrees clockwise
    158 .TP
    159 .B Upside down
    160 Toggles whether images are displayed upside-down.
    161 .TP
    162 .B Next
    163 Displays the next page.
    164 .TP
    165 .B Prev
    166 Displays the previous page.
    167 .TP
    168 .B Zerox
    169 Displays the current image in a new page window.
    170 Useful for selecting important pages from large documents.
    171 .TP
    172 .B Reverse
    173 Reverses the order in which pages are displayed.
    174 .TP
    175 .B Write
    176 Writes the image to file.
    177 .PD
    178 .PP
    179 Button 3 raises a menu of the
    180 pages
    181 to be selected for viewing in any order.
    182 .PP
    183 Typing a
    184 .B q
    185 or
    186 control-D exits the program.
    187 Typing a
    188 .B u
    189 toggles whether images are displayed upside-down.
    190 (This is useful in the common case of mistransmitted upside-down faxes).
    191 Typing a
    192 .B r
    193 reverses the order in which pages are displayed.
    194 Typing a
    195 .B w
    196 will write the currently viewed page to a new file as a compressed
    197 .MR image (7)
    198 file.
    199 When possible, the filename is of the form
    200 .IR basename . pagenum . bit .
    201 Typing a
    202 .B d
    203 removes an image from the working set.
    204 .PP
    205 To go to a specific page, one can type its number followed by enter.
    206 Typing left arrow, backspace, or minus displays the previous page.
    207 Typing right arrow, space, or enter displays the next page.
    208 The up and down arrow pan up and down one half screen height,
    209 changing pages when panning off the top or bottom of the page.
    210 .PP
    211 .I Page
    212 calls
    213 Unix's
    214 .IR gs (1)
    215 to draw each page of PostScript
    216 and
    217 PDF
    218 .IR files .
    219 It also calls a variety of conversion programs, such as those described in
    220 .MR jpg (1) ,
    221 to convert the various raster graphics formats
    222 into Inferno bitmap files.
    223 Pages are converted ``on the fly,'' as needed.
    224 .SH EXAMPLES
    225 .TP
    226 .L
    227 page /sys/src/cmd/gs/examples/tiger.eps
    228 Display a color PostScript file.
    229 .TP
    230 .L
    231 page /usr/inferno/icons/*.bit
    232 Browse the Inferno bitmap library.
    233 .TP
    234 .L
    235 man -t page | page -w
    236 Preview this manual in a new window.
    237 .SH "SEE ALSO
    238 .MR gs (1) ,
    239 .MR jpg (1) ,
    240 .MR proof (1) ,
    241 .MR tex (1) ,
    242 .MR troff (1)
    243 .SH SOURCE
    244 .B \*9/src/cmd/page
    245 .SH DIAGNOSTICS
    246 The mouse cursor changes to an arrow and ellipsis
    247 when
    248 .I page
    249 is reading or writing a file.
    250 .SH BUGS
    251 .I Page
    252 supports reading of only one document
    253 file at a time, and
    254 the user interface is clumsy when viewing very large documents.
    255 .PP
    256 When viewing multipage PostScript files that do not contain
    257 .RB `` %%Page ''
    258 comments, the button 3 menu only contains
    259 ``this page'' and ``next page'':
    260 correctly determining
    261 page boundaries in Postscript code is not computable
    262 in the general case.
    263 .PP
    264 If
    265 .I page
    266 has trouble viewing a Postscript file,
    267 it might not be exactly conforming: try viewing it with the
    268 .B -P
    269 option.
    270 .PP
    271 The interface to the plumber is unsatisfactory.  In particular,
    272 document references cannot be sent
    273 via plumbing messages.
    274 .PP
    275 There are too many keyboard commands and menu items.
    276 .PP
    277 Displaying a PostScript or PDF file depends both on having
    278 GhostScript
    279 (see
    280 .MR gs (1) )
    281 installed and on the underlying operating system
    282 providing a file descriptor device tree at
    283 .BR /dev/fd .
    284 .PP
    285 Some FreeBSD installations
    286 do not provide file descriptors greater than 2
    287 in
    288 .BR /dev/fd .
    289 To fix this, add
    290 .IP
    291 .EX
    292 /fdescfs    /dev/fd    fdescfs    rw    0    0
    293 .EE
    294 .LP
    295 to
    296 .BR /etc/fstab ,
    297 and then
    298 .B mount
    299 .BR /dev/fd .
    300 (Adding the line to
    301 .B fstab
    302 ensures causes FreeBSD to mount the file system
    303 automatically at boot time.)