Re: [iText-questions] Writing to ServletOutputStream

2010-02-22 Thread Sebastian Furth
Hi, thank you so much! You were right - the problem was the JSP. Now I am using a Servlet instead and everything works fine. Once again thank you for your help, although it wasn't an iText Problem. Best regards. Sebastian Furth 2010/2/22 mkl > > Sebastian, > > > Sebastian Furth wrote: > > I

Re: [iText-questions] Writing to ServletOutputStream

2010-02-22 Thread mkl
Sebastian, Sebastian Furth wrote: > I attached the pdf where the Graphics is missing. Maybe you can get some > information out of it. If you look at that PDF, you'll see that something along the lines of high-bit-shaving happened --- there are very many '?' characters at positions where charact

Re: [iText-questions] Writing to ServletOutputStream

2010-02-22 Thread 1T3XT info
Mike Marchywka wrote: > > LOL, I don't imagine this will help, but the high bit is probably being set > to zero. That's exactly what happened. It's described in both the 1st and 2nd edition of "iText in Action". 1st edition: page 642-643 I can’t repeat it enough: It’s a bad idea to use JSP to

Re: [iText-questions] Writing to ServletOutputStream

2010-02-22 Thread 1T3XT info
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 <>>>/Subtype/Form

Re: [iText-questions] Writing to ServletOutputStream

2010-02-22 Thread Mike Marchywka
googlemail.com > To: itext-questions@lists.sourceforge.net > Subject: Re: [iText-questions] Writing to ServletOutputStream > > 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

Re: [iText-questions] Writing to ServletOutputStream

2010-02-22 Thread Klas Lindbäck
I am doing in a similar way. The only notable difference is the response header. I use the following, which works in both IE and Firefox: response.setHeader("Content-Disposition", "*inline*; filename=form.pdf"); /Klas ---

Re: [iText-questions] Writing to ServletOutputStream

2010-02-22 Thread Sebastian Furth
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. //Get the file content ByteArrayOutputStream bstream = de.d3web.empiricalTesting.caseVisualization.jung.JUNGCaseVisualize

Re: [iText-questions] Writing to ServletOutputStream

2010-02-22 Thread Mike Marchywka
> Date: Mon, 22 Feb 2010 15:14:55 +0100 > From: sebastian.fu...@googlemail.com > To: itext-questions@lists.sourceforge.net > Subject: Re: [iText-questions] Writing to ServletOutputStream > > Thanks for your reply! > >

Re: [iText-questions] Writing to ServletOutputStream

2010-02-22 Thread Mike Marchywka
> Date: Mon, 22 Feb 2010 14:56:45 +0100 > From: i...@1t3xt.info > To: itext-questions@lists.sourceforge.net > Subject: Re: [iText-questions] Writing to ServletOutputStream > > Sebastian Furth wrote: >> Something happens du

Re: [iText-questions] Writing to ServletOutputStream

2010-02-22 Thread 1T3XT info
Sebastian Furth wrote: > Once again, thanks for your reply. Unfortunately I think I don't have > enough experience to understand your hints :) It were good hints though; I thought everybody knew wget. If possible, can you explain your problem as good as Mike explained how to use wget? For insta

Re: [iText-questions] Writing to ServletOutputStream

2010-02-22 Thread Sebastian Furth
Thanks for your reply! Is it possible that the ServletOutputStream "shaves" the upper bit from every byte? I have a method which returns a ByteArrayOutputStream containing the pdf data. If I delegate this OutputStream to a FileOutputStream everything is ok but if I use the ServletOutputStream the

Re: [iText-questions] Writing to ServletOutputStream

2010-02-22 Thread 1T3XT info
Sebastian Furth wrote: > Something happens during the request because it returns a pdf in the > dimension set in the code - but there is absolutely no content (blank). Sounds like the "blank page" problem described in the book (1st and 2nd edition). This happens if you "shave" the upper bit from

Re: [iText-questions] Writing to ServletOutputStream

2010-02-22 Thread Mike Marchywka
> Date: Mon, 22 Feb 2010 11:45:43 +0100 > From: > To: itext-questions@lists.sourceforge.net > Subject: [iText-questions] Writing to ServletOutputStream > > Hi, > > Please note that I postet links to pastie.org for better readability of the > co

[iText-questions] Writing to ServletOutputStream

2010-02-22 Thread Sebastian Furth
Hi, Please note that I postet links to pastie.org for better readability of the code snippets. I am using iText to print graphs produced with the JUNG Framework to pdfs. To achieve this I have the following code: http://www.pastie.org/private/rsy6wzneedpvo4dai3vcgw Writing the graphics Object t

[iText-questions] writing to ServletOutputStream

2003-07-02 Thread Lloyd Bergman
I tired following the tutorial and passed a ByteOutputStream to PdfWriter and then wrote that to a ServletOutputStream. Ofcourse I had to use setContentSize passing the length of my ByteOutputStream using its size method like the tutorial said but I got a ProtocolException saying that I exceeded t