Skip to main content

XML to DOC to PDF

5 replies [Last post]
bezmax
Offline
Joined: 2008-12-05
Points: 0

Greetings,
what is the easiest(and fastest) way to perform this kind of transformation: "Data in XML" to "Some MS Word 2003 Supported format" to PDF?

My first guess was to fill the template with XML data (using Placeholders for example) and then save it and convert it to PDF. But I can't just put placeholders to DOC files, and I can't convert from some other Word formats to PDF...

My primary task is to convert XML Data to PDF allowing users to change the PDF on-demand. The best way to change the PDF on-demand seems to give user some kind of MS Word readable document, and then convert it back.

There are 2 main problems with this task:
1) I can't use OpenOffice for conversion.
2) System should be able to convert ~1 page of table-based document per 1 second on 2Ghz Core.

Thanks in advance.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nummisalo
Offline
Joined: 2004-03-08
Points: 0

Davisor Publishor can use Word doc as an template and then generate PDF.

frankgrimes97
Offline
Joined: 2006-09-13
Points: 0

If you really want to manipulate Microsoft document formats, have a look at POI: http://poi.apache.org/

htll
Offline
Joined: 2009-02-02
Points: 0
tarbo
Offline
Joined: 2006-12-18
Points: 0

Have you taken a look at [url=http://www.lowagie.com/iText/]iText[/url]? We use it at my workplace to create documents on demand, supplying them via a webserver, and we use XML-based input as well.

So basically:
1) user requests a document;
2) server loads an XML template and reads data from the database (or other XMLs);
3) push through an XML parser with iText configured;
4) push PDF output to user.

Is that what you were looking for?

frankgrimes97
Offline
Joined: 2006-09-13
Points: 0

FYI, I've found that UJAC's print module can make dealing with iText a lot easier.

http://ujac.sourceforge.net/
http://ujac.sourceforge.net/html/print-documentation.html

your mileage may vary...