Hi Micah, I'm not quite sure what you are looking for and I'm not a TIFF expert by any means.
The TIFF v6 Specification can be downloaded from here: http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf The Lib TIFF Org at http://www.libtiff.org may also have information you are looking for. I think these would be good places to gain your explanation. The specification document has a section on TIFF extensions and states some readers may or may not support the extensions. As for Windows vs. Unix/Linux, there's always the little-endian/big-endian consideration on any non-standardized data. I'd think a TIFF newsgroup may also be beneficial.. Just trying to give you some resources to review. Howard Shank ----- Original Message ---- From: "Tessler, Micah (M.B.)" <[EMAIL PROTECTED]> To: Post all your questions about iText here <itext-questions@lists.sourceforge.net> Sent: Tuesday, May 6, 2008 4:50:01 PM Subject: Re: [iText-questions] Invalid TIFF -- Invalid codeencounteredwhiledecoding 2D group 4 compressed data. OK thanks. I'm not quite sure what you are driving at here, though. I went through these pages and no one had a solution. All I saw were complaints about the problem or related ones. Did one of the links you found actually have an explanation of the expanded "standard" or how the data handshake works so that the Windows viewers can understand the non-standard data? -Micah -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Howard Shank Sent: Tuesday, May 06, 2008 4:23 PM To: Post all your questions about iText here Subject: Re: [iText-questions] Invalid TIFF -- Invalid codeencounteredwhiledecoding 2D group 4 compressed data. Just doing a search on Google at http://www.google.com/search?q=Invalid+code+encountered+while+decoding+2D+group+4&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a turns up many pages of this same problem. Howard Shank ----- Original Message ---- From: "Tessler, Micah (M..B.)" <[EMAIL PROTECTED]> To: Post all your questions about iText here <itext-questions@lists.sourceforge.net> Sent: Tuesday, May 6, 2008 11:59:32 AM Subject: Re: [iText-questions] Invalid TIFF -- Invalid code encounteredwhiledecoding 2D group 4 compressed data. Thanks for the response, but I remain skeptical that large numbers of scanners are corrupting the T6 compression standard. And all of the commercial tiff readers (I haven't tried open-source readers other than iText) understand this corruption. I submit that a more logical interpretation of the evidence is that there is another standard, other than official T6, that these systems are coded to.. While the TIFF tag says the file is T6 compressed, the compression appears to adhere to an extension of the standard. I would be curious if anyone has come across these expanded/updated standards. Questions: 1) Has anyone else come across these expanded/updated standards? 2) Has anyone found an open-source tiff-viewer that can handle these corrupted tiffs? If so, iText may be able to share the expanded decoding algorithm with said viewer. Micah Tessler Consulting Architect Ford Credit Enterprise Architecture (313) 322-4267 [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paulo Soares Sent: Monday, May 05, 2008 1:02 PM To: Post all your questions about iText here Subject: Re: [iText-questions] Invalid TIFF -- Invalid code encounteredwhiledecoding 2D group 4 compressed data. Please post your fix. Apparentely nobody can produce correct G4 files and the burden is on the viewers to fix the broken files. iText does some effort to fix it but only goes so far. Paulo > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Tessler, Micah (M.B.) > Sent: Monday, May 05, 2008 5:20 PM > To: itext-questions@lists.sourceforge.net > Subject: [iText-questions] Invalid TIFF -- Invalid code encountered > whiledecoding 2D group 4 compressed data. > > I am working with a set of tiffs, several of which are invalid. > When reading into iText, I get the following error message: > Invalid TIFF -- Invalid code encountered while decoding 2D group 4 > compressed data. > iText version = 2.02 > > My question is regarding the cause of the issue and some possible > approaches to fixing it. > > Windows Picture and Fax Viewer, and Microsoft Paint can both read and > render the invalid tiffs, but iText always errors out. > > In the iText code, I was able to fix the error by modifying the iText > method: > com.lowagie.text.pdf.codec.TIFFFaxDecoder.decodeT6() > > Where there is an if/else block within a loop that checks the code to > decide if something is horizontal (code=1), vertical (codes = 2-8), > pass (code=0), or extension (code = 11), I am getting a code of 10. > > iText libraries throw the exception "Invalid TIFF -- Invalid code > encountered while decoding 2D group 4 compressed data." > in that case. I hacked the code to instead do the following in the > unknown code block to treat the invalid code as a line-break. Which > renders the Tiff in iText the same way that the as the Microsoft > viewers do. > > bitOffset = w; > updatePointer(7 - bits); > > Questions: > 1) Is the 10-code linebreak a valid extension to the T-6 spec? > 2) How would one go about "fixing" the tiff data to be iText friendly? > Removing the bad codes and inserting enough horizontal white > pixels to end the line? > 3) Is there a later release of iText that addresses the invalid tiff > question? > > Thanks, > -Micah > > > Micah Tessler > Consulting Architect > Ford Credit Enterprise Architecture > (313) 322-4267 > [EMAIL PROTECTED] > > 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. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar