Blob


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