This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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 Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Xml to pdf" Watch "Xml to pdf" New topic
Author

Xml to pdf

Peter Venema
Greenhorn

Joined: Dec 02, 2002
Posts: 6
Hello,

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
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Xml to pdf