Please post the tiff.
Paulo
----- Original Message -----
From: "Matt Davis" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, May 08, 2006 4:59 PM
Subject: [iText-questions] Adding Tiff images problem
I am generating thousands of PDF file, each containing up to 700 tiff
(sometimes jpg) images (around an average of 500 images per PDF book).
Most
of them are working just fine, however I occasionally get the following
error when I try to get an instance of what seems to be random tiff
images.
System.NullReferenceException: Object reference not set to an instance of
an object.
at iTextSharp.text.pdf.codec.TIFFDirectory.GetFieldAsLong(Int32 tag,
Int32 index)
at iTextSharp.text.pdf.codec.TiffImage.GetTiffImageColor(TIFFDirectory
dir, RandomAccessFileOrArray s)
at
iTextSharp.text.pdf.codec.TiffImage.GetTiffImage(RandomAccessFileOrArray
s,
Int32 page, Boolean direct)
at iTextSharp.text.Image.GetInstance(Uri url)
at iTextSharp.text.Image.GetInstance(String filename)
at MDLR_PDF_Book_Maker.MDLRPDFCreator.AddImage(PagesRow page)
The line that starts all this is the following:
Dim img As Image = Nothing
Dim imgPath As String ' the path to the file
....
img = Image.GetInstance(imgPath)
.....
The tiff image exists and is able to be viewed in any standard tiff image
viewing program (including windows xp) in all cases I have found. I am
using the .Net port of iText. Has anyone else seen something similar
and/or
know what is causing it and/or how to fix it?
Thanks,
Matt P. Davis
Programmer Analyst
Maryland State Archives
[EMAIL PROTECTED]
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions