1
0

page 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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. Typing a
  137. .B q
  138. or
  139. control-D exits the program.
  140. Typing a
  141. .B u
  142. toggles whether images are displayed upside-down.
  143. (This is useful in the common case of mistransmitted upside-down faxes).
  144. Typing a
  145. .B r
  146. reverses the order in which pages are displayed.
  147. Typing a
  148. .B w
  149. will write the currently viewed page to a new file as a compressed
  150. .IR image (6)
  151. file.
  152. When possible, the filename is of the form
  153. .IR basename . pagenum . bit .
  154. Typing a
  155. .B d
  156. removes an image from the working set.
  157. .PP
  158. To go to a specific page, one can type its number followed by enter.
  159. Typing left arrow, backspace, or minus displays the previous page.
  160. Clicking button 2 or typing right arrow, space, or enter displays the next page.
  161. The up and down arrow pan up and down one half screen height,
  162. changing pages when panning off the top or bottom of the page.
  163. Button 3 raises a menu of the
  164. pages
  165. to be selected for viewing in any order.
  166. .PP
  167. .I Page
  168. calls
  169. .IR gs (1)
  170. to draw each page of PostScript
  171. and
  172. PDF
  173. .IR files .
  174. It also calls a variety of conversion programs, such as those described in
  175. .IR jpg (1),
  176. to convert the various raster graphics formats
  177. into Inferno bitmap files.
  178. Pages are converted ``on the fly,'' as needed.
  179. .SH EXAMPLES
  180. .TP
  181. .L
  182. page /sys/src/cmd/gs/examples/tiger.ps
  183. Display a color PostScript file.
  184. .TP
  185. .L
  186. page /usr/inferno/icons/*.bit
  187. Browse the Inferno bitmap library.
  188. .TP
  189. .L
  190. man -t page | page -w
  191. Preview this manual in a new window.
  192. .SH "SEE ALSO
  193. .IR gs (1),
  194. .IR jpg (1),
  195. .IR tex (1),
  196. .IR troff (1)
  197. .SH SOURCE
  198. .B /sys/src/cmd/page
  199. .SH DIAGNOSTICS
  200. The mouse cursor changes to an arrow and ellipsis
  201. when
  202. .I page
  203. is reading or writing a file.
  204. .SH BUGS
  205. .I Page
  206. supports reading of only one document
  207. file at a time, and
  208. the user interface is clumsy when viewing very large documents.
  209. .PP
  210. When viewing multipage PostScript files that do not contain
  211. .RB `` %%Page ''
  212. comments, the button 3 menu only contains
  213. ``this page'' and ``next page'':
  214. correctly determining
  215. page boundaries in Postscript code is not computable
  216. in the general case.
  217. .PP
  218. If
  219. .I page
  220. has trouble viewing a Postscript file,
  221. it might not be exactly conforming: try viewing it with the
  222. .B -P
  223. option.
  224. .PP
  225. The interface to the plumber is unsatisfactory. In particular,
  226. document references cannot be sent
  227. via plumbing messages.
  228. .PP
  229. There are too many keyboard commands.