I believe that I got the bottom of the issue now. Java mail has a bug which caused the "inflated bytes" (0D0A) of iText pdf after quoted-printable (QP) encoding of SMTP transfer. It is still not fixed as of today. Anyone who is interested may see the following link (the proposed fix is not 100% right so please use your own judgement). The current source file *(*QPEncoderStream.java*) *can be downloaded from Oracle.
http://forums.java.net/jive/message.jspa?messageID=324636 In summary, the blank pdf issue is not iText issue. Instead, it is a SMTP transfer issue. Theoretically, QP by RFC 1251 can be used to transfer binary file. However, practically existing QP encoder and decoder may have issues which may be caused by the vague language in the spec. For example, Java mail encoder has the above issue and Outlook as pop3 client has decoding issue. So far, base64 is a better choice to transfer binary file. Thanks to everyone who responded. Jiangang Song On Wed, May 26, 2010 at 11:53 PM, Jiangang Song <[email protected]> wrote: > Michael, > > Your points are well-taken. > > Michael wrote: > >This means that your quoted-printable encoder does not do a thorough job, > >either because it is buggy or because you have not told it that the data > to > >encode is not text where a single carriage return, a single line feed, and > a > >carriage return line feed combination all mean the same. > > This is what I am suspecting as well. Strangely another pdf file (generated > by JClass from Quest Software) does not have "inflated bytes" issue, > although it went through exactly the same Java mail code I posted. I will > dig further on it. > > Regards, > > Jiangang Song > >
------------------------------------------------------------------------------
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
