AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
July 2011

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2011.07.16 15:10 "tiff2pdf changes tiff image order", by Gerard Duerrmeyer
2011.07.19 12:52 "Re: tiff2pdf changes tiff image order", by Tim Ayres
2011.07.19 14:20 "Re: tiff2pdf changes tiff image order", by Gerard Duerrmeyer
2011.07.19 14:28 "Re: tiff2pdf changes tiff image order", by Gerard Duerrmeyer

2011.07.19 14:28 "Re: tiff2pdf changes tiff image order", by Gerard Duerrmeyer

Apologies to the list, I just realized that a response I made earlier
with the solutions I had found, in large part thanks to Mr.
Warmerdam's help, did not get CC'd to the list. Here is the relevant
portion:

Herr Warmerdam identified the origin of the problem in the bug report
which led me to find two temporary solutions around the issue:
A) Heavy handed:
$ exiv2 rm *.tif
$ tiffcp *.tif bla.tif
$ tiff2pdf -o bla.pdf bla.tif

B) Slightly more surgical:
$ exiftool -PageNumber= *.tif
$ tiffcp *.tif bla.tif
$ tiff2pdf -o bla.pdf bla.tif

I also placed this information in the bug report so that others may
find it if they suffer from the same issue. Basically the summarized
problem is that TIFF files have the option for a "PageNumber" in their
metadata. If one uses tiffcp to concat TIFF files it respects the
order you request. If one uses tiff2pdf, the program does not respect
the order you specify and instead attempts to re-order if there is
"PageNumber" metadata present.
So if you have two sets of TIFFs say two 10 page documents, each with
metadata numbering pages from 1-10, and want to concat the two
together and turn them into a PDF, the tiff2pdf process will mix the
two documents together from the best of my understanding, as that is
basically what was happening to me.
Now that I know it is due to this metadata I have two solutions for
clearing it, one that clears ALL metadata with really common tools
(A), another that clears just the PageNumber metadata with a slightly
less common but no less easy to find tool (B).

I hope this helps someone who else in time of need after pulling their
hair out for far too long.

Cheers,

GD

On Tue, Jul 19, 2011 at 9:20 AM, Gerard Duerrmeyer
<g.duerrmeyer@gmail.com> wrote:
> Mr. Tim,
>
> Thank you for your response. That is actually a perfectly simple
> solution and surprisingly it did not even occur to me.
> Because of the code I already have in place, I think I will stick with
> stripping the metadata that is causing tiff2pdf to change my chosen
> order, but I will do some performance testing down the road to
> determine if your idea may be worthy of a rewrite.
>
> Thank you all for your help and responses, it is very satisfying to go
> from having no solutions to having many!
>
> Cheers,
>
> GD
>
> On Tue, Jul 19, 2011 at 7:52 AM, Tim Ayres <laur.olb1@gmail.com> wrote:
>> Gerard,
>>
>> I can't help you with your tiff2pdf troubles, but an alternate solution may
>> be to convert the tiffs to separate pdfs with tiff2pdf, then use pdftk to
>> concatenate the separate pdfs into a single multi-page pdf.
>>
>> Tim
>>
>> On 07/16/2011 10:10 AM, Gerard Duerrmeyer wrote:
>>
>> I have run into what I consider an interesting bug. I have filed a bug
>> report here  http://bugzilla.maptools.org/show_bug.cgi?id=2330, but would
>> like further input if anyone has any ideas.
>> I am at the eve of a rather large project which I have been putting off as a
>> result of this bug.
>> To summarize, after using tiffcp to concat multiple tiffs into a single
>> multi-page tiff, the tiff image order is correct and as desired. If I run
>> tiff2pdf on the resulting tiff file the resulting pdf has some pages out of
>> order compared to the input tiff file.
>> If there is not a good solution for using tiff2pdf to retain image order I
>> am open to suggestions and alternatives or any guidance one may offer. I am
>> having trouble pushing the project back further and it all hinges pretty
>> much now on a proper linux based CLI tiff to pdf conversion.
>> Thank you all for any and all help!
>> Cheers,
>> GD
>>
>> _______________________________________________
>> Tiff mailing list: Tiff@lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/tiff
>> http://www.remotesensing.org/libtiff/
>>
>> _______________________________________________
>> Tiff mailing list: Tiff@lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/tiff
>> http://www.remotesensing.org/libtiff/
>>
>