page 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  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 tex (1)
  29. or
  30. .IR troff (1)
  31. device independent output
  32. file.
  33. .I Tex
  34. or
  35. .I troff
  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 (6)
  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. .IR abort (2)
  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 (6)
  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. .IR gs (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 tex (1),
  238. .IR troff (1)
  239. .SH SOURCE
  240. .B /sys/src/cmd/page
  241. .SH DIAGNOSTICS
  242. The mouse cursor changes to an arrow and ellipsis
  243. when
  244. .I page
  245. is reading or writing a file.
  246. .SH BUGS
  247. .I Page
  248. supports reading of only one document
  249. file at a time, and
  250. the user interface is clumsy when viewing very large documents.
  251. .PP
  252. When viewing multipage PostScript files that do not contain
  253. .RB `` %%Page ''
  254. comments, the button 3 menu only contains
  255. ``this page'' and ``next page'':
  256. correctly determining
  257. page boundaries in Postscript code is not computable
  258. in the general case.
  259. .PP
  260. If
  261. .I page
  262. has trouble viewing a Postscript file,
  263. it might not be exactly conforming: try viewing it with the
  264. .B -P
  265. option.
  266. .PP
  267. The interface to the plumber is unsatisfactory. In particular,
  268. document references cannot be sent
  269. via plumbing messages.
  270. .PP
  271. There are too many keyboard commands.