Ah, yes, the old mantra "but it opens in the viewer!". All the viewers (and
iText for that matter) go to great lengths to open broken documents. Some they
succeed some they don't. I need the tiff to see if it's a bug in iText or if
it's a broken tiff that may be recoverable, just like the viewer does.
Paulo
________________________________
From: Hugh McLaughlin [[email protected]]
Sent: Wednesday, December 21, 2011 8:30 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Error Converting fax TIF to PDF
The TIF opens fine in a viewer. How can you tell if a TIF is broken?
From: Paulo Soares [mailto:[email protected]]
Sent: Wednesday, December 21, 2011 1:13 PM
To: Post all your questions about iText here
Subject: Re: [iText-questions] Error Converting fax TIF to PDF
Looks like a broken tiff. It may be an yet unknown bug but I would have to see
the tiff.
Paulo
----- Original Message -----
From: Hugh McLaughlin<mailto:[email protected]>
To:
[email protected]<mailto:[email protected]>
Sent: Wednesday, December 21, 2011 5:56 PM
Subject: [iText-questions] Error Converting fax TIF to PDF
Hello Everyone and thanks for your help in advance. I am working on an
application that watches for incoming faxes on Microsoft fax (Windows 2003
server). The inbound fax is written to a folder and I am using the
FileSystemWatcher to watch for newly written TIF files to convert to PDF. From
there, I am using iTextSharp to convert the files. The process has been
working well for the past few days, but I have now run into the following
messages on a couple of conversions:
J:\Faxes\Fax00000174.TIF~RF29ca9f3a.TMP caused the error:
System.IO.EndOfStreamException: Attempted to read past the end of the stream.
at iTextSharp.text.pdf.RandomAccessFileOrArray.ReadUnsignedShort() at
iTextSharp.text.pdf.codec.TIFFDirectory.GetNumDirectories(RandomAccessFileOrArray
stream) at
iTextSharp.text.pdf.codec.TiffImage.GetNumberOfPages(RandomAccessFileOrArray s)
at Fax_Factory.Form1.ConvertFaxtoPDF(String SourceFile)
I’m not exactly sure what this is trying to tell me. I have logic in the
conversion to check for end of file. Any help would be greatly appreciated.
Thanks
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php