Reiser, Michael, TRA writes:

> <%@ page import="java.io.*" %>\n
> <%@ page import="java.util.*" %>\n
> <%@ page import="com.lowagie.text.*" %>\n
> <%@ page import="com.lowagie.text.pdf.PdfWriter" %>\n
> <%
> Document document = new Document();

> With IE I see the PDF-code in the browser window, and with NS the pdf opens,
> but it's empty... 
> 
> Can you give me any help?

Read any book about JSP and you will understand that it
is a bad idea to generate binary data using JSPs.
You should use a Servlet instead. As you know JSPs are
compiled to Servlets internally, so you could ask what's
the difference? Well, I'll give you one example:
you probably don't see them, but when I read your code
example, I see lots of unnecessary newlines (I added '\n'
in the code above, so that you can also see them).
The Servlet that is compiled from this JSP will probably
add these newlines to the resulting document and this can
cause the trouble you're having. 

But I can be wrong, I know very little about JSP.
Go to the CVS repository and take a look at the
file pdf.jsp in www/examples/
That's a working JSP example.

_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to