tiff2ps.1 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. .\"
  2. .\" Copyright (c) 1988-1997 Sam Leffler
  3. .\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
  4. .\"
  5. .\" Permission to use, copy, modify, distribute, and sell this software and
  6. .\" its documentation for any purpose is hereby granted without fee, provided
  7. .\" that (i) the above copyright notices and this permission notice appear in
  8. .\" all copies of the software and related documentation, and (ii) the names of
  9. .\" Sam Leffler and Silicon Graphics may not be used in any advertising or
  10. .\" publicity relating to the software without the specific, prior written
  11. .\" permission of Sam Leffler and Silicon Graphics.
  12. .\"
  13. .\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
  14. .\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
  15. .\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  16. .\"
  17. .\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  18. .\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  19. .\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  20. .\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
  21. .\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
  22. .\" OF THIS SOFTWARE.
  23. .\"
  24. .ds Ps PostScript
  25. .if n .po 0
  26. .TH TIFF2PS 1 "November 2, 2005" "libtiff"
  27. .SH NAME
  28. tiff2ps \- convert a
  29. .SM TIFF
  30. image to \*(Ps\*(Tm
  31. .SH SYNOPSIS
  32. .B tiff2ps
  33. [
  34. .I options
  35. ]
  36. .I "input.tif ..."
  37. .SH DESCRIPTION
  38. .I tiff2ps
  39. reads
  40. .SM TIFF
  41. images and writes \*(Ps or Encapsulated \*(Ps (EPS)
  42. on the standard output.
  43. By default,
  44. .I tiff2ps
  45. writes Encapsulated \*(Ps for the first image in the specified
  46. .SM TIFF
  47. image file.
  48. .PP
  49. By default,
  50. .I tiff2ps
  51. will generate \*(Ps that fills a printed area specified
  52. by the
  53. .SM TIFF
  54. tags in the input file.
  55. If the file does not contain
  56. .I XResolution
  57. or
  58. .I YResolution
  59. tags, then the printed area is set according to the image dimensions.
  60. The
  61. .B \-w
  62. and
  63. .B \-h
  64. options (see below)
  65. can be used to set the dimensions of the printed area in inches;
  66. overriding any relevant
  67. .SM TIFF
  68. tags.
  69. .PP
  70. The \*(Ps generated for
  71. .SM RGB,
  72. palette, and
  73. .SM CMYK
  74. images uses the
  75. .I colorimage
  76. operator.
  77. The \*(Ps generated for
  78. greyscale and bilevel images
  79. uses the
  80. .I image
  81. operator.
  82. When the
  83. .I colorimage
  84. operator is used, \*(Ps code to emulate this operator
  85. on older \*(Ps printers is also generated.
  86. Note that this emulation code can be very slow.
  87. .PP
  88. Color images with associated alpha data are composited over
  89. a white background.
  90. .SH OPTIONS
  91. .TP
  92. .B \-1
  93. Generate \*(Ps Level 1 (the default).
  94. .TP
  95. .B \-2
  96. Generate \*(Ps Level 2.
  97. .TP
  98. .B \-3
  99. Generate \*(Ps Level 3. It basically allows one to use the /flateDecode
  100. filter for ZIP compressed TIFF images.
  101. .TP
  102. .B \-8
  103. Disable use of ASCII85 encoding with \*(Ps Level 2/3.
  104. .TP
  105. .B \-a
  106. Generate output for all IFDs (pages) in the input file.
  107. .TP
  108. .B \-b
  109. Specify the bottom margin for the output (in inches). This does not affect
  110. the height of the printed image.
  111. .TP
  112. .B \-c
  113. Center the image in the output. This option only shows an effect if both
  114. the
  115. .B \-w
  116. and the
  117. .B \-h
  118. option are given.
  119. .TP
  120. .B \-C
  121. Specify the document creator name.
  122. .TP
  123. .B \-d
  124. Set the initial
  125. .SM TIFF
  126. directory to the specified directory number.
  127. (NB: Directories are numbered starting at zero.)
  128. This option is useful for selecting individual pages in a
  129. multi-page (e.g. facsimile) file.
  130. .TP
  131. .B \-D
  132. Enable duplex printing (two pages per sheet of paper).
  133. .TP
  134. .B \-e
  135. Force the generation of Encapsulated \*(Ps (implies
  136. .BR \-z ).
  137. .TP
  138. .B \-h
  139. Specify the vertical size of the printed area (in inches).
  140. .TP
  141. .B \-H
  142. Specify the maximum height of image (in inches). Images with larger sizes will
  143. be split in several pages. Option
  144. .B \-L
  145. may be used for specifying size of split images overlapping.
  146. .B \-i
  147. Enable/disable pixel interpolation. This option requires a
  148. single numeric value: zero to disable pixel interpolation and
  149. non-zero to enable. The default is enabled.
  150. .TP
  151. .B \-L
  152. Specify the size of overlapping for split images (in inches). Used in
  153. conjunction with
  154. .B \-H
  155. and
  156. .B \-W
  157. options.
  158. .TP
  159. .B \-l
  160. Specify the left margin for the output (in inches). This does not affect
  161. the width of the printed image.
  162. .TP
  163. .BI \-M " size"
  164. Set maximum memory allocation size (in MiB). The default is 256MiB.
  165. Set to 0 to disable the limit.
  166. .TP
  167. .B \-m
  168. Where possible render using the
  169. .I imagemask
  170. \*(Ps operator instead of the
  171. .I image
  172. operator. When this option is specified
  173. .I tiff2ps
  174. will use
  175. .I imagemask
  176. for rendering 1 bit deep images. If this option is not specified
  177. or if the image depth is greater than 1 then the
  178. .I image
  179. operator is used.
  180. .TP
  181. .B \-o
  182. Set the initial
  183. .SM TIFF
  184. directory to the
  185. .SM IFD
  186. at the specified file offset.
  187. This option is useful for selecting thumbnail images and the
  188. like which are hidden using the
  189. .I SubIFD
  190. tag.
  191. .TP
  192. .B \-O
  193. Write \*(Ps to specified file instead of standard output.
  194. .TP
  195. .B \-p
  196. Force the generation of (non-Encapsulated) \*(Ps.
  197. .TP
  198. .B \-P L|P
  199. Set optional PageOrientation DSC comment to Landscape or Portrait.
  200. .TP
  201. .B \-r 90|180|270|auto
  202. Rotate image by 90, 180, 270 degrees or auto. Auto picks the best
  203. fit for the image on the specified paper size (eg portrait
  204. or landscape) if -h or -w is specified. Rotation is in degrees
  205. counterclockwise. Auto rotates 90 degrees ccw to produce landscape.
  206. .TP
  207. .B \-s
  208. Generate output for a single IFD (page) in the input file.
  209. .TP
  210. .B \-t
  211. Specify the document title string.
  212. .TP
  213. .B \-T
  214. Print pages for top edge binding.
  215. .TP
  216. .B \-w
  217. Specify the horizontal size of the printed area (in inches).
  218. .TP
  219. .B \-W
  220. Specify the maximum width of image (in inches). Images with larger sizes will
  221. be split in several pages. Options
  222. .B \-L
  223. and
  224. .B \-W
  225. are mutually exclusive.
  226. .TP
  227. .B \-x
  228. Override resolution units specified in the TIFF as centimeters.
  229. .TP
  230. .B \-y
  231. Override resolution units specified in the TIFF as inches.
  232. .TP
  233. .B \-z
  234. When generating \*(Ps Level 2, data is scaled so that it does not
  235. image into the
  236. .I deadzone
  237. on a page (the outer margin that the printing device is unable to mark).
  238. This option suppresses this behavior.
  239. When \*(Ps Level 1 is generated, data is imaged to the entire printed
  240. page and this option has no affect.
  241. .SH EXAMPLES
  242. The following generates \*(Ps Level 2 for all pages of a facsimile:
  243. .RS
  244. .nf
  245. tiff2ps \-a2 fax.tif | lpr
  246. .fi
  247. .RE
  248. Note also that if you have version 2.6.1 or newer of Ghostscript then you
  249. can efficiently preview facsimile generated with the above command.
  250. .PP
  251. To generate Encapsulated \*(Ps for a the image at directory 2
  252. of an image use:
  253. .RS
  254. .nf
  255. tiff2ps \-d 1 foo.tif
  256. .fi
  257. .RE
  258. (Notice that directories are numbered starting at zero.)
  259. .PP
  260. If you have a long image, it may be split in several pages:
  261. .RS
  262. .nf
  263. tiff2ps \-h11 \-w8.5 \-H14 \-L.5 foo.tif > foo.ps
  264. .fi
  265. .RE
  266. The page size is set to 8.5x11 by
  267. .B \-w
  268. and
  269. .B \-h
  270. options. We will accept a small amount of vertical compression, so
  271. .B \-H
  272. set to 14. Any pages between 11 and 14 inches will be fit onto one page.
  273. Pages longer than 14 inches are cut off at 11 and continued on the next
  274. page. The
  275. .B \-L.5
  276. option says to repeat a half inch on the next page (to improve readability).
  277. .SH BUGS
  278. Because \*(Ps does not support the notion of a colormap,
  279. 8-bit palette images produce 24-bit \*(Ps images.
  280. This conversion results in output that is six times
  281. bigger than the original image and which takes a long time
  282. to send to a printer over a serial line.
  283. Matters are even worse for 4-, 2-, and 1-bit palette images.
  284. .PP
  285. Does not handle tiled images when generating \*(Ps Level I output.
  286. .SH "SEE ALSO"
  287. .BR pal2rgb (1),
  288. .BR tiffinfo (1),
  289. .BR tiffcp (1),
  290. .BR tiffgt (1),
  291. .BR tiffmedian (1),
  292. .BR tiff2bw (1),
  293. .BR tiffsv (1),
  294. .BR libtiff (3)
  295. .PP
  296. Libtiff library home page:
  297. .BR http://www.simplesystems.org/libtiff/