Sebastian Furth wrote:
> Of course it were good hints - the problem is me :)
> 
> OK I try to explain my problem:
> 
> I have created a JSP-Servlet which shall return a PDF Document on request.

That's the problem!!!

I opened your PDF in a text editor. This is what I saw:
1 0 obj
<</Type/XObject/Resources<</ProcSet [/PDF /Text /ImageB /ImageC 
/ImageI]/Font<</F1 2 0 R/F2 3 0 R>>>>/Subtype/Form/BBox[0 0 600 
1550]/Matrix [1 0 0 1 0 0]/Length 4827/FormType 1/Filter/FlateDecode>>stream
x??]Ms????W?q?????886f???l?;?????Gj????LRc??o???d????}q(<??y...@h$*??5i??ts???????80_?????z??????\?????_???????_???????n?]???????n-jo?????|\]?w?s????/?5?~??yRo??)M????^?r?6??PG?????t??o???\(?4???Xn??????j???;???e???1?+?
 
  ^?A?`5s??w?:????B?3???????w?+6l??WE??=*???
??yz???_~????????k?q~?...@?????j?d???}?\5????\gr???g????qz+?z
?Z???,jF?um?E?-t?$p/???8?;e??>?m?????????t???~?j???,f????????R?wg?cK?x?sNk????Tb?a?h?e\P^?D:?"H??????.??J

34??wY?w??Ct?K?\??+?1???~???????G?????"e?h&???t??????E??f:g?????1?????mv?H?)c?3??c;?0????????????Q??

Do you see all these question marks? Those are "shaved bytes". Who 
shaved these bytes? JSP did! Compare the file with the correct PDF and 
you'll see that there are much less question marks.

> Thank you in advance!

Throw away your JSP as far as possible and replace it with a Servlet!
If you have ever followed a course about JSP, you should have been 
taught that JSP IS NOT SUITED TO CREATE BINARY DATA. It's like eating 
soup with a fork instead of with a spoon.

If you really insist on using JSP, you need configure your application 
server so that JSP doesn't treat binary data as non-binary data.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
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