Jiangang Song,
Jiangang Song wrote: > Comparing the pdf file generated directly and the one transferred through > SMTP using "content-transfer-encoding: quoted-printable", all 0A is > inflated to 0D 0A and all 0D is also inflated to 0D 0A. 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. Jiangang Song wrote: > Just this minor inflation blows up acrobat reader and it shows up as blank > pdf. This "minor inflation" actually both makes many PDF cross reference entries point to the wrong file positions (something the Acrobat products get along with surprisingly well, by the way) and, even worse, completely garbles the contents of compressed data streams, e.g. page contents. PDF is essentially a binary format after all in spite of it looking readable in a text editor. The PDF reference seems to allow for special cases in which PDF files may be treated as text data (cf. ISO 32000-1:2008, section 7.5.2, last paragraph) but as in these cases the PDF file may not include any binary data, such cases are the rare exception. Therefore, no assumptions shall be made concerning whether or not certain bytes appear in PDF files, and no changes to the file shall be made in transport. (Shame on me, when at the end of the last century I first wrote some code manipulating PDF files, I used C string manipulation functions which implied that no zero bytes were allowed in the files; I so forced the users to save their PDF files in an ASCII mode...) 1T3XT BVBA wrote: > Quoted-printable is WRONG for PDFs. Use another encoding to transfer the > document. This is not completely true as you can use quoted-printable encoding to transport binary data, it's simply extremely wasteful and, thus, inappropriate to do so. Is there any reason to so vehemently insist on using quoted-printable encoding? Regards, Michael. -- View this message in context: http://itext-general.2136553.n4.nabble.com/Blank-PDF-after-it-is-transfered-through-SMTP-tp2228773p2231154.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ 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/
