You may have an unsupported tiff page that will cause an exception. See the 
console messages.

Paulo

----- Original Message ----- 
From: "Lewis, Cory (Genworth)" <[EMAIL PROTECTED]>
To: "Post all your questions about iText here" 
<[email protected]>
Sent: Thursday, May 24, 2007 8:01 PM
Subject: Re: [iText-questions] Possible bug?


>
>>
>> Hi!
>> I'm trying to create a pdf from a tiff image using this
>> example
>> http://itext.ugent.be/library/com/lowagie/examples/objects/ima
>> ges/tiff/Tiff2Pdf.java
>>
>> The program work fine but pdf has one page less. The original
>> tiff has 8 pages while pdf has 7 pages!
>> Strangely the method comps = TiffImage.getNumberOfPages(ra);
>> return 7 pages! Why?
>> I've tryed the same program with 3 tiffs and obtain this result:
>> 1 tiff) 1 page tiff ---> 1 page pdf
>> 2 tiff) 1 page tiff ---> 0 page pdf ExceptionConverter:
>> java.io.IOException: The document has no pages.
>> 3 tiff) 8 page tiff ---> 7 page pdf
>>
>> First tiff is in Little endian format while the other are in
>> Big endian format. Is a bug or an error in the tiffs? How can
>> I solve the problem? Thanks!
>>
>
>
> I can't speak for your tiffs, obviously, but I do a ton of tiff to pdf
> conversion, and all of our tiffs start at page 0.
> Might account for your off-by-1 error.
>
> I don't use iText's tiff library, though, so maybe it handles that
> internally. I use JAI to handle my tiffs.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to