Debian Codegraph @

texk/xdvipsk/thirdparty/libtiff/doc/tools/tiff2pdf.rst

raw
1 tiff2pdf
2 ========
3
4 .. program:: tiff2pdf
5
6 Synopsis
7 --------
8
9 **tiff2pdf** [ *options* ] *input.tiff*
10
11 Description
12 -----------
13
14 :program:`tiff2pdf` opens a TIFF image and writes a PDF document to standard output.
15
16 The program converts one TIFF file to one PDF file, including multiple page
17 TIFF files, tiled TIFF files, black and white. grayscale, and color TIFF
18 files that contain data of TIFF photometric interpretations of bilevel,
19 grayscale, RGB, YCbCr, CMYK separation, and ICC L*a*b* as supported by
20 :program:`libtiff` and PDF.
21
22 If you have multiple TIFF files to convert into one PDF file then use :program:`tiffcp`
23 or other program to concatenate the files into a multiple page TIFF file.
24 If the input TIFF file is of huge dimensions (greater than 10000 pixels height
25 or width) convert the input image to a tiled TIFF if it is not already.
26
27 The standard output is standard output. Set the output file name with the
28 :option:`-o` option.
29
30 All black and white files are compressed into a single strip CCITT G4 Fax
31 compressed PDF, unless tiled, where tiled black and white images are
32 compressed into tiled CCITT G4 Fax compressed PDF,
33 :program:`libtiff` CCITT support is assumed.
34
35 Color and grayscale data can be compressed using either JPEG compression,
36 ITU-T T.81, or Zip/Deflate LZ77 compression. Set the compression type using
37 the :option:`-j` or :option:`-z` options. JPEG compression support
38 requires that :program:`libtiff` be configured with JPEG support, and
39 Zip/Deflate compression support requires that :program:`libtiff`
40 be configured with Zip support. Use only one or the other of
41 :option:`-j` and :option:`-z`.
42
43 If the input TIFF contains single strip CCITT G4 Fax compressed information,
44 then that is written to the PDF file without transcoding, unless the options
45 of no compression and no passthrough are set, :option:`-d` and :option:`-n`.
46
47 If the input TIFF contains JPEG or single strip Zip/Deflate compressed
48 information, and they are configured, then that is written to the PDF file
49 without transcoding, unless the options of no compression and no passthrough
50 are set.
51
52 The default page size upon which the TIFF image is placed is determined by
53 the resolution and extent of the image data. Default values for the TIFF
54 image resolution can be set using the :option:`-x` and :option:`-y`
55 options. The page size can be set using the :option:`-p`
56 option for paper size, or :option:`-w` and :option:`-l`
57 for paper width and length, then each page of the TIFF image is centered on
58 its page. The distance unit for default resolution and page width and
59 length can be set by the :option:`-u` option, the default unit is inch.
60
61 Various items of the output document information can be set with the
62 :option:`-e`, :option:`-c`, :option:`-a`, :option:`-t`, :option:`-s`,
63 and :option:`-k` options. Setting the argument of the option to ``""`` for these
64 tags causes the relevant document information field to be not written. Some
65 of the document information values otherwise get their information from the
66 input TIFF image, the software, author, document name, and image description.
67
68 The Portable Document Format (PDF) specification is copyrighted by Adobe
69 Systems, Incorporated.
70
71 Options
72 -------
73
74 .. option:: -o output-file
75
76 Set the output to go to file *output-file*
77
78 .. option:: -j
79
80 Compress with JPEG (requires :program:`libjpeg` configured with
81 :program:`libtiff`).
82
83 .. option:: -z
84
85 Compress with Zip/Deflate (requires :program`zlib` configured with
86 :program:`libtiff`).
87
88 .. option:: -q quality
89
90 Set the compression quality, 1-100 for JPEG.
91
92 .. option:: -n
93
94 Do not allow data to be converted without uncompressing, no compressed
95 data passthrough.
96
97 .. option:: -b
98
99 Set PDF ``Interpolate`` user preference.
100
101 .. option:: -d
102
103 Do not compress (decompress) - except monochrome to CCITT Group 4.
104
105 .. option:: -i
106
107 Invert colors.
108
109 .. option:: -p paper-size
110
111 Set paper size, e.g., ``letter``, ``legal``, ``A4``.
112
113 .. option:: -F
114
115 Cause the tiff to fill the PDF page.
116
117 .. option:: -u [ i | m ]
118
119 Set distance unit, ``i`` for inch, ``m`` for centimeter.
120
121 .. option:: -w width
122
123 Set width in units.
124
125 .. option:: -l length
126
127 Set length in units.
128
129 .. option:: -x xres
130
131 Set x/width resolution default.
132
133 .. option:: -y yres
134
135 Set y/length resolution default.
136
137 .. option:: -r [ d | o ]
138
139 Set ``d`` for resolution default for images without resolution,
140 ``o`` for resolution override for all images.
141
142 .. option:: -f
143
144 Set PDF ``Fit Window`` user preference.
145
146 .. option:: -e YYYYMMDDHHMMSS
147
148 Set document information date, overrides image or current date/time default,
149 ``YYYYMMDDHHMMSS``.
150
151 .. option:: -c creator
152
153 Set document information creator, overrides image software default.
154
155 .. option:: -a author
156
157 Set document information author, overrides image artist default.
158
159 .. option:: -t title
160
161 Set document information title, overrides image document name default.
162
163 .. option:: -s subject
164
165 Set document information subject, overrides image image description default.
166
167 .. option:: -k keywords
168
169 Set document information keywords.
170
171 .. option:: -m size
172
173 Set memory allocation limit (in MiB). Default is 256MiB. Set to 0 to disable the limit.
174
175 .. option:: -h
176
177 List usage reminder to stderr and exit.
178
179 Examples
180 --------
181
182 The following example would generate the file output.pdf from input.tiff:
183
184 .. highlight:: shell
185
186 ::
187
188 tiff2pdf -o output.pdf input.tiff
189
190 The following example would generate PDF output from input.tiff and write it
191 to standard output:
192
193 ::
194
195 tiff2pdf input.tiff
196
197 The following example would generate the file output.pdf from input.tiff,
198 putting the image pages on a letter sized page, compressing the output
199 with JPEG, with JPEG quality 75, setting the title to ``Document``, and setting
200 the ``Fit Window`` option:
201
202 ::
203
204 tiff2pdf -p letter -j -q 75 -t "Document" -f -o output.pdf input.tiff
205
206 See also
207 --------
208
209 :doc:`tiffcp` (1),
210 :doc:`tiff2ps` (1),
211 :doc:`/functions/libtiff` (3tiff),