2002.11.14 00:13 "Multi-page tiff vs. acrobat writer", by Chris Losinger

2002.11.14 00:13 "Multi-page tiff vs. acrobat writer", by Chris Losinger

My customers are telling me that Acrobat writer (Not *reader*) will only read the first page from the multi-page TIFFs my stuff writes, but it will read all pages from multi-page TIFFs created with "other" software (not sure what this other software is).

i'm using LIbTiff 3.5.5 and creating these multi-page tiffs like so:

  1. open the file (TIFFOpen)
  2. set a bunch of tags (dimensions, bit depth, etc)
  3. write the image rows (TIFFWriteScanline in a loop)
  4. write the directory
  5. more pages? go to 2

this produces TIFFs that LibTiff (and things that i suspect are using LibTIFF) is clearly happy with. i can read back all the pages and get no complaints.

one thing i did notice: if i do a TIFF dump of the multi-page TIFF i write vs the "other" multi-page TIFF, the first IFD from the LibTiff TIFF starts off after the image data (as expected), but the first IFD of the other TIFF starts at offset 0x08. it's obviously writing the IFD before the image data.

would that make a difference? can you even write the directory before the image with LibTIFF? i seem to remember that you can't.

-c

----
Chris Losinger
losinger@earthlink.net
smallest@smalleranimals.com          http://www.smalleranimals.com