kaililleby / jodconverter

JODConverter automates document conversions using LibreOffice/OpenOffice.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JODConverter

JODConverter (for Java OpenDocument Converter) automates document conversions using LibreOffice or Apache OpenOffice.

Forked from https://github.com/mirkonasato/jodconverter

There is documentation on Google Code. Over time I'll copy that over and update it as necessary so this can be a central point of reference.

README Sections

Licensing

JODConverter is open source software, you can redistribute it and/or modify it under either (at your option) of the following licenses:

  1. The GNU Lesser General Public License, Version 3 (or later)
  2. The Apache License, Version 2.0

Take a look at each individual dependency license to see if it's right for you.

Version

3 Beta... since I'm new to this particular project, I suspect it will remain in Beta for the forseeable future.

Supported Conversions

Here's a listing of the input to output conversions that I have tests automated for. Each input format/extension is listed, followed by the formats/extensions that my tests have successfully converted the input format/extension to.

Notes:

  • I performed these tests with LibreOffice version 4.1.3.2 on (K)ubuntu 13.10.
  • I did not manually verify the accuracy of each conversion, I only know these conversions saved and exited.

General

source target
csv csv, html, ods, pdf, sxc, tsv, xls, xlsx
html doc, docx, html, odt, pdf, rtf, sxw, txt
rtf doc, docx, html, odt, pdf, rtf, sxw, txt
svg odg, pdf, swf, vdx, vsd, vsdm, vsdx
tsv csv, html, ods, pdf, sxc, tsv, xls, xlsx
txt doc, docx, html, odt, pdf, rtf, sxw, txt

###LibreOffice, OpenOffice, StarOffice

source target
odg odg, pdf, swf, vdx, vsd, vsdm, vsdx
odp html, odp, pdf, ppt, swf, sxi
ods csv, html, ods, pdf, sxc, tsv, xls, xlsx
odt doc, docx, html, odt, pdf, rtf, sxw, txt
sxc csv, html, ods, pdf, sxc, tsv, xls, xlsx
sxi html, odp, pdf, ppt, swf, sxi
sxw doc, docx, html, odt, pdf, rtf, sxw, txt

Microsoft

source target
doc doc, docx, html, odt, pdf, rtf, sxw, txt
docx doc, docx, html, odt, pdf, rtf, sxw, txt
ppt html, odp, pdf, ppt, swf, sxi
vdx odg, pdf, swf, vdx, vsd, vsdm, vsdx
vsd odg, pdf, swf, vdx, vsd, vsdm, vsdx
vsdm odg, pdf, swf, vdx, vsd, vsdm, vsdx
vsdx odg, pdf, swf, vdx, vsd, vsdm, vsdx
xls csv, html, ods, pdf, sxc, tsv, xls, xlsx
xlsx csv, html, ods, pdf, sxc, tsv, xls, xlsx

Unexpected Failures

I'm unable to save anything to svg format in my tests... not even a file that's already svg. The following conversions to svg have been attempted but have failed:

  • odg > svg
  • svg > svg
  • vdx > svg
  • vsd > svg
  • vsdm > svg
  • vsdx > svg

TODO

  • copy and update documentation from Google Code Wiki pages
    • Getting Started
    • Configuration
    • Whats New in 3
    • FAQ
  • figure out why I can't save anything to svg format
  • finalize Visio to PDF support and provide tests
  • make indents and bracketing consistent... sorry if you prefer spaces, but I prefer tabs

Getting Started

Google Code Getting Started Page

Configuration

Google Code Configuration Page

Building from Source

Checkout

Check out the source code and sample app from GitHub using your method of choice

SSH

git clone git@github.com:erictallman/jodconverter.git ~/projects/jodconverter

HTTPS

git clone https://github.com/erictallman/jodconverter.git ~/projects/jodconverter

Subversion

svn checkout https://github.com/erictallman/jodconverter ~/projects/jodconverter

or, Download Zip

For this documentation we'll assume you have checked it out into:

~/projects/jodconverter

The source code is located in:

~/projects/jodconverter/jodconverter-core

The sample app is located in:

~/projects/jodconverter/jodconverter-sample-webapp

Maven Build

JODConverter uses Maven 3 as its build tool, so it can be built in the usual Maven way. A Sigar native library is now required for building (although it's optional at runtime).

Please see the Maven website for more information about Maven.

Get Sigar

Since you need Sigar for the build process, download the right one for your system from svn.hyperic.org and save it to a local dir.

svn checkout http://svn.hyperic.org/projects/sigar_bin/dist/SIGAR_1_6_5/lib/ ~/projects/sigar1.6.5

Build Options

Now that you have Sigar, you'll need to specify it in your build command. Example:

cd ~/projects/jodconverter/jodconverter-core
mvn -Djava.library.path=~/projects/sigar1.6.5 clean install

You can specify the LibreOffice/OpenOffice installation path explicity using the -Doffice.home flag. Example:

cd ~/projects/jodconverter/jodconverter-core
mvn -Djava.library.path=~/projects/sigar1.6.5 -Doffice.home=/usr/bin/libreoffice clean install

If you experience test failures, try skipping the tests (not a good practice but because of OOo integration failures may be due to timeout values rather than real issues): Example:

cd ~/projects/jodconverter/jodconverter-core
mvn -Djava.library.path=~/projects/sigar1.6.5 -Doffice.home=/usr/bin/libreoffice -DskipTests clean install

After you've built and tested everything out, you can roll a distribution zip file, containing the JODConverter library and dependencies, and be on your way. Example:

cd ~/projects/jodconverter/jodconverter-core
mvn assembly:single

Want to build and roll a distribution all in one command? You can do that too! Example:

cd ~/projects/jodconverter/jodconverter-core
mvn -Djava.library.path=~/projects/sigar1.6.5 -Doffice.home=/usr/bin/libreoffice -DskipTests clean install assembly:single

which should result in a file called jodconverter-core-3.0-SNAPSHOT-dist.zip in:

~/projects/jodconverter/jodconverter-core/target

Original: Google Code Building from Source Page

What's New in 3

Google Code What's New in Version 3.0 Page

FAQ

Google Code FAQ Page

About

JODConverter automates document conversions using LibreOffice/OpenOffice.org

License:Apache License 2.0