Excerpt from Jguru (http://www.jguru.com/faq/view.jsp?EID=820005)

There are a number of ways of converting JSP output to a PDF file. One such
way is listed here as HTML to PS then PS to PDF. This way often gets
corrupted or doesn't look the way you want it to look. If this happens,
there are two ways of doing what you want:

(Intermediate difficulty): Use an FDF form to populate a PDF template. FDF
is the form data file that adobe uses to populate its PDF files that have
Form Fields within the text. This is versitile and can do 90% of what most
people will require on a text readout for a report.

(Advanced difficulty): Output all your data from your report JSP into an XML
output, combine that output with an XSL-FO stylesheet and generate an FO
file which can be read by FOP, a product by the Apache group
(xml.apache.org). This is the most versitile option, and can do ANYTHING you
want to do w.r.t. PDF files. Where I work, we are using this to generate
reports for users similar to what you want to do. Look into this, as this
is, likely, the best option.

Never tried it myself, but it does seem that it's not simple.  Surely
there's an easier way than the above?

 -----Original Message-----
From:   Kumar Sameer [mailto:[EMAIL PROTECTED]]
Sent:   16 April 2002 09:42
To:     [EMAIL PROTECTED]
Subject:        using acrobat reader for o/p

Hi !

The code is :

<%@ page contentType="application/pdf" %>
<%-- Note that there are tabs, not spaces, between columns. --%>
1997    1998    1999    2000    2001    2002(Expected)
12.4    13.6    14.2    14.9    15.2    15.9

in IE it seems acrobat reader is not used and the o/p is displayed in the
same IE window as :

1997    1998    1999    2000    2001    2002(Expected)
12.4    13.6    14.2    14.9    15.2    15.9


In Netscape, Acrobat reader is opened but error message :

          File does not begin with '%PDF-'.

appears.

Any suggestions ?

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to