Universal Document Converter

A simple Java wrapper for Pandoc

What is Universal Document Converter?

Universal Document Converter (UDC) is an utility that converts documents from one format into another.

UDC is a Java wrapper for Pandoc, a great tool that performs lots of different conversions.

What is Pandoc?

Pandoc is a standalone command-line program that can convert documents in markdown, HTML, LaTeX, MediaWiki markup, TWiki markup, Microsoft Word docx, LibreOffice ODT, EPUB and many more file formats.

Pandoc is free software, released under the GPL, and available for Windows, Linux and Mac OS X.


You need Java 8 and Pandoc installed in your system.

Maven installation


Pandoc installation

Read about installing Pandoc (it's just executing an installer for Windows, Linux or Mac).


 new DocumentConverter()
     .fromFile(new File("sample.odt"), InputFormat.ODT)
     .toFile(new File("sample.html"), OutputFormat.HTML5)
     .addOption("-s")                     //optional
     .workingDirectory(new File("/tmp"))  //optional

Also, the class has several usage examples.


Universal Document Converter is distributed under the Mozilla Public License, version 2.0. The LICENSE file contains more information about the licesing of this product. You can read more about the MPL at Mozilla Public License FAQ.