Jiangang Song wrote: > Thank you for pointing out "shave bytes". > > In fact, this time it is "inflated bytes". 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. There is no other difference.
Then you have found your problem, and it's not iText related. > Just this minor inflation blows up acrobat reader and it shows up as > blank pdf. (There is no such inflation if base64 is used as > content-transfer-encoding.) Base64 is a safe way to transfer binary data. > So the pdf generated by iText contains either 0A or 0D but not 0D 0A > together. Is this by design? Or is it configurable? PDF is a BINARY format. ANY byte and byte combination can be present in your PDF. You can't just say: hey, I want the file to be binary, but I don't want the combination 0D0A to turn up anywhere. This is so NOT an iText question. > P.S.: all test is on Windows platform. Attached page_numbers.pdf is > generated directly and test.pdf is received through email as described > above using "quoted-printable" encoding. Quoted-printable is WRONG for PDFs. Use another encoding to transfer the document. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ _______________________________________________ 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/
