File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes Jsp to Pdf file using Apache Fop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Jsp to Pdf file using Apache Fop" Watch "Jsp to Pdf file using Apache Fop" New topic

Jsp to Pdf file using Apache Fop

naro pad
Ranch Hand

Joined: May 07, 2008
Posts: 58


I'm a newbie to this forum patient
I'm using NetBeans IDE 6.0.1 and I want to use Apache Fop to export a jsp page to pdf file. What steps I have to follow in order to install Fop and use it under Netbeans. I check out on the Internet but I didn't find anything useful.

Can anyone help me at least to provide me a reference or any comments?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63874

"Pan", please check your private messages for an important administrative matter.

[Asking smart questions] [About Bear] [Books by Bear]
Stevi Deter
Ranch Hand

Joined: Mar 22, 2008
Posts: 265

I can't address the NetBeans side of the question, but as for using Apache FOP to create a PDF of a JSP page, you'll need to figure out the best way to transform your JSP content into an XSL-FO object that can then be output as a PDF.

The best place to start is looking at the examples that come with the Apache FOP download. This article may also help guide you in the right direction.

There will always be people who are ahead of the curve, and people who are behind the curve. But knowledge moves the curve. --Bill James
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
I may be misunderstanding the question, but if you're trying to create a PDF version of an HTML page, then that's not so easy. The first step would be to create an XML version of the page -containing just the data to be displayed, and no layout markup-, which could then be converted into HTML for display and into PDF using an XSL-FO stylesheet using FOP.
I agree. Here's the link:
subject: Jsp to Pdf file using Apache Fop
It's not a secret anymore!