You can send me the tiff.

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Q Bert
> Sent: Friday, February 09, 2007 3:36 AM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] EOF exception being thrown
> 
> In trying to retrieve an image using the 
> TiffImage.getTiffImage() method, I'm recieving an EOF 
> exception. In looking into this issue through the source 
> code, i'm seeing that the size of the byte array of the file 
> is 1000046, and it appears the "length" returned by the 
> TIFFTAG_STRIPBYTECOUNTS tag(TiffDirectory line 303, tag 
> number 279 in the TiffConstants) is returning 1234899 which 
> is greater than the size of the file. I also noticed that an 
> image viewer on my computer is able to render it. Any clue on 
> a quick fix to allow this? even if i have to add it here and 
> recompile the source? I have a customer that would like to 
> not have to re-image all the documents throwing this error on 
> their system. 
> 
> Let me know if you would like the tif and how to get it to you.
> 
> Thanks!
> 
> error is below:
> 
> ExceptionConverter: java.io.EOFException
>     at 
> com.lowagie.text.pdf.RandomAccessFileOrArray.readFully(RandomA
> ccessFileOrArray.java:234) 
>     at 
> com.lowagie.text.pdf.RandomAccessFileOrArray.readFully(RandomA
> ccessFileOrArray.java:221)
>     at 
> com.lowagie.text.pdf.codec.TiffImage.getTiffImage(TiffImage.java:243)
>     at trimin.test.testLowagie.main(testLowagie.java :33)
> 
> here is the java test code i used to try and debug this:
> 
> public class testLowagie {
> 
>     public static void main(String[] args) { 
>         try {
>             String fileName = "C:/IMG46461.tif";
>             int numPages = 0;
>             File file = new File(fileName);
> 
>             RandomAccessFileOrArray ra = new 
> RandomAccessFileOrArray(fileName); 
>             ra.seek(0);
>             numPages = TiffImage.getNumberOfPages(ra);
> System.out.println("number of bytes in file: " + ra.length());
>             Image img = TiffImage.getTiffImage(ra, 1,false); 
> System.out.println("image retrieved");    
>         } catch(Exception e) {
>             System.out.println("Problem getting image: " + 
> e.getMessage()); 
>             e.printStackTrace();
>         } 
>     }
> }
> 
> 
> ________________________________
> 
> Live Search: Better results, fast Try it now! 
> <http://get.live.com/search/overview> 
> 


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to