Jean Logeart
Jean Logeart

Reputation: 53839

Convert odt to pdf in Java without starting soffice

My problem seems quite basic but I haven't been able to find a neat solution.

I need to convert an odt file to a pdf file. JODConverter works nicely but soffice needs to be installed on the machine and started separately. For production constraints, I cannot assume soffice will be installed on the machines executing my app.

So is there a way to do this conversion simply by setting the right dependencies and calling the right piece of code? Can this be done simply using the UNO API or any other way? If yes, can you give me a little more insight?

Thanks!

Upvotes: 2

Views: 7627

Answers (3)

Piratheep M
Piratheep M

Reputation: 11

JOD Converter works well, if dedicated server open office can be installed using headless option https://askubuntu.com/questions/194352/install-openoffice-for-headless-use

With Tomcat, you can run web app to convert any file supported by Open Office to PDF http://www.artofsolving.com/opensource/jodconverter

Upvotes: 1

rustyx
rustyx

Reputation: 85481

You might want to try ODFDOM.

Disclaimer: I have not used it myself.

Upvotes: 1

KyleTheNiner
KyleTheNiner

Reputation: 11

If CUPS is available you may look into using CUPS-PDF. It is independent of soffice. It will simply "print" the .odt file to PDF format. Here is the CUPS-PDF homepage.

Upvotes: 1

Related Questions