2012.08.27 15:44 "[Tiff] Unitless TIFF file results in page size in points instead of inches", by Aaron Trewern

2012.08.27 16:14 "Re: [Tiff] Unitless TIFF file results in page size in points instead of inches", by Aaron Trewern

Aha

So there is a tool called tiffset which means I can:

root# tiffset -s 296 2 test.tif
root# tiff2pdf -o test.pdf test.tif
root# pdfinfo test.pdf

Producer:       libtiff / tiff2pdf - 20060323
CreationDate:   Mon Aug 27 10:05:50 2012
ModDate:        Mon Aug 27 10:05:50 2012

Tagged:         no
Pages:          2
Encrypted:      no

Page size:      614.4 x 792 pts
File size:      155719 bytes
Optimized:      no

PDF version: 1.1

On Mon, Aug 27, 2012 at 10:06 AM, Aaron Trewern <aaron.trewern@gmail.com> wrote:

Thank you for responding.

It is not clear from your reply whether you mean I should recreate the TIFF files with the units set correctly and then convert them, or if I can specify some command line parameters to override the unitless setting. If you mean the latter then I have tried that with no success, which I guess means I have to pre-process these files that do not have the units set :(

root# tiff2pdf -u i -o inches.pdf 9179_0.tif
root# pdfinfo inches.pdf

Producer:       libtiff / tiff2pdf - 20060323
CreationDate:   Mon Aug 27 09:53:41 2012
ModDate:        Mon Aug 27 09:53:41 2012

Page size:      8.5333 x 11 pts
File size:      155713 bytes
Optimized:      no
PDF version:    1.1

root# tiff2pdf -r o -u i -o inches.pdf 9179_0.tif
root# pdfinfo inches.pdf
Producer:       libtiff / tiff2pdf - 20060323
CreationDate:   Mon Aug 27 09:53:10 2012
ModDate:        Mon Aug 27 09:53:10 2012
Tagged:         no
Pages:          2
Encrypted:      no
Page size:      8.5333 x 11 pts
File size:      155713 bytes
Optimized:      no
PDF version:    1.1

On Mon, Aug 27, 2012 at 9:51 AM, Lee Howard <faxguy@howardsilvan.com> wrote:

On 08/27/2012 08:44 AM, Aaron Trewern wrote:

> I have a TIFF file with the details below. I expected tiff2pdf to convert this to a letter size (8.5x11") page instead the result a PDF file with a page size 8.5x11 points ~ 0.12x0.15 inches.

The man page implied that the default unit was inches but it looks the source simply divides the image width by the resolution to get the PDF page width in points.

Is this the expected behaviour?

TIFF Directory at offset 0x8 (8)
    Image Width: 2560 Image Length: 3300
    Resolution: 300, 300 (unitless)
    Compression Scheme: CCITT Group 4
    Photometric Interpretation: min-is-black
    Samples/Pixel: 1
    Rows/Strip: 1
    Planar Configuration: single image plane

I can't speak to the documentation concerns, but when a TIFF image is unitless the assumption, then, is that those are Postscript units... at least by PDF and Postscript images.

If that image is 300x300 dpi then you need to put a units in there of inches.