This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Xml to pdf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Xml to pdf" Watch "Xml to pdf" New topic

Xml to pdf

Peter Venema

Joined: Dec 02, 2002
Posts: 6

I'm a lonely java developer in a non-java company. Maybe someone can advise me here.

I want to make a "print option" for a huge xml document. I've got experience with fop, xsl so I can build some action that converts the xml doc to pdf.

But how to i18n? I've already got an action that works well with jsp, it's not perfect yet. But for our purposes (print policy information for life insurances) it works o.k. With the Struts framework it's easy to i18n.

Would it be an idea to use JAXB to map the xml to objects (so I can use them for other purposes as well). And than first create a jsp which will be converted to pdf? It sounds like a very slow process to me. I read that JAXB is very slow to, it's very easy to use though.

Can somebody give me some advice here?
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
How about writing a servlet filter which takes the internationalized XML document (perhaps created by a JSP) and runs it through XSL-FO into PDF?

Then again, if the document really is big, perhaps you should do this asynchronously?

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Have you tried LearnNowOnline?
subject: Xml to pdf