Yes, but the link does not say about how to convert the XML into PDF using OpenOffice. I even browsed through some of the content in the internet and not able to find any satisfactory answers...
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35252
7
posted
0
Why not simply install OO and check out what it can do? I don't think that its API provides any functionality that the GUI doesn't, too.
Ulf Dittmer wrote:Why not simply install OO and check out what it can do? I don't think that its API provides any functionality that the GUI doesn't, too.
I tried that and got an exception as below,
08.10.2009 11:14:31 com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection connect
INFO: connected
java.lang.IllegalArgumentException: unknown document format for file: C:\Dokumente und Einstellungen\Jothi\Desktop\page1.xml
Where page1.xml is the xml that I formed out of the first sheet of my Excel workbook.
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32708
4
posted
0
You would have to parse the XML to find what it represents first, surely?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35252
7
posted
0
Jothi Shankar Kumar wrote:I tried that and got an exception as below,
What I meant is: Use its GUI (not its API) to see how it might be used to perform the conversion. Then automate that using the Java UNO API. This has nothing to do with JODConverter.
But I agree with Maneesh that for converting XML to PDF Apache FOP is probably a better choice.
Yes, I do understand that. But the other problem is the XML file that I'm trying to convert is an intermediatory file. My original conversion has to be from Excel to PDF. This is just an alternate approach that I#m trying to do. But with the Apache FOP, I need an xsl which I do not have with my XML being converted using the JExcel API.
You mean with just my xml document which I got translated using the JExcel API, (which just has a DTD) I can generate a FOP XS?
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35252
7
posted
0
No. Again, the DTD is not used during a document conversion. FOP transforms the XML into PDF using the XSL-FO stylesheet that *you* have created manually. This is all explained in detail -and with examples- on the FOP site.