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. 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 during SMTP transfer.)

So the pdf generated by iText contains either 0A or 0D but not 0D 0A together. 
Is this by design? Or is it configurable?

P.S.: all test is on Windows platform. 


> Date: Mon, 24 May 2010 18:00:38 +0200
> From: [email protected]
> To: [email protected]
> Subject: Re: [iText-questions] Blank PDF after it is transfered through SMTP
> 
> Jiangang Song wrote:
> > Or is there anything wrong with my usage of Java mail?
> 
> The "blank page problem" is (as documented in the book) caused by the 
> fact that some applications (such as Java mail?) "shave bytes".
> 
> PDF is a binary file format. You need to transfer it as a binary file. 
> If you open up the PDF with the "shaved bytes" in a text editor, you'll 
> see that there are lots of question marks. Those are bytes that have 
> lost a bit due to the way you've transferred them.
> 
> You need to make sure that you transfer the file as a binary file.
> -- 
> 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/
                                          
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2
------------------------------------------------------------------------------

_______________________________________________
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/

Reply via email to