OpenOffice in Java

I need a Java interface for converting OpenOffice documents to be manual (Open ... and then Save As ...) and also access PDF generation.

Below is an example of what I want to achieve.

1) Open one type of document (OpenOffice Writer document document or Microsoft Office document) into memory and save it in another supported format.

2) Open one type of document in memory and export as PDF.

I went through http://api.openoffice.org

but did not receive any material to help me get started. I also tried JODConverter , but for that I need to start OpenOffice as a service. I prefer to include all the basic OpenOffice functionality in one JAR file so that the user can use my application without installing or running openoffice on their PC.

What would the url / code snippet be, where can I get the tutorials to start with?

Also do I need to add some JAR files? Will the application work even if I don't have OpenOffice installed on my PC?

+2


source to share


3 answers


Perhaps you should take a look at NOA (Nice Office Access). It is a Java API that makes it easy to use the OJ.o native Java API. This allows a quick "remote control" OO.o.

Also tell me if you need to add multiple cans?

Yes, it is documented.



Will the application work even if I don't have an open office installed on my computer?

No, the application requires an executable (!) OO.o instance, as it essentially remotely controls OO.o. An instance can theoretically run on another computer (controlled over the network).

+4


source


try the ODF Toolkit project . it has an API that allows you to manipulate open documents without installing openoffice.org on your client machine. here is a good article to get you started with the ODF toolkit: Integrate OpenOffice with Java without installing OpenOffice



+2


source


I once used OpenOffice to convert MS Word to PDF. While this was the only free solution, I was not entirely happy with the resulting PDF, especially when your document has complex bidi scripts .

For the conversion, as far as I remember, there were two possible ways. One for using OS pipes and the other for socket or something. I don't have my code right now, but you only need to search in this url. First you have to launch the OpenOffice executable (I just took a simple tour on the OpenOffice wiki ) with some parameters, and then started the Java application using the provided Java libraries.

0


source







All Articles