• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

OpenOffice File Conversion formats

 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

What are the file conversion formats does OpenOffice supports? Can I convert xml file to a pdf using OpenOffice??
 
Marshal
Posts: 79505
379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Somebody else asked the same question recently: here.
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you do not have this compulsion of using Open Office, scroll down to the link provided in the other post and check out FOP
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Marshal
Posts: 79505
379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You would have to parse the XML to find what it represents first, surely?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just have the DTD. Need to check if Apache FOP works with the DTD...
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A DTD is not an XML file; FOP has no use for that. How do you think a DTD helps with a document conversion?

But with the Apache FOP, I need an xsl which I do not have


Correct, you'd need to create the XSL-FO stylesheet, but that's most likely less work than to use either the OO Java API, or the iText API.
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Joe San
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Might be I would just try that and get back here in case of any questions.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic