Document rendering solution

Render & view ODT in Java

Native and high performance ODT file viewer API for Java, J2EE and J2SE based applications, supporting a wide range of additional features to customize the appearance of the output document format.

Steps to render ODT file in Java

With GroupDocs.Viewer you can render ODT to HTML, JPEG, PNG or PDF in a few steps.

  1. Add GroupDocs.Viewer for Java as a dependency to your project.
  2. Create an instance of Viewer class and load the ODT file with full path.
  3. Set options to render ODT file into HTML, PNG, JPEG or PDF format.
  4. Render file and check output in the current directory.
Copy

// Set up input ODT file
String filePath = "input.odt";

// Instantiate GroupDocs.Viewer
try (Viewer viewer = new Viewer(filePath))
{
    // Set view options
    HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources();
        
    // Render ODT file to HTML with embedded resources
    viewer.view(viewOptions);
}
<dependencies> <dependency> <groupId>com.groupdocs</groupId> <artifactId>groupdocs-viewer</artifactId> <version>23.7</version> </dependency> </dependencies> <repositories> <repository> <id>repository.groupdocs.com</id> <name>GroupDocs Repository</name> <url>https://repository.groupdocs.com/repo/</url> </repository> </repositories>
click to copy
copied
More examples Documentation

About GroupDocs.Viewer for Java API

Enable your Java applications to display over 180+ file formats in HTML, PDF or image modes using GroupDocs.Viewer for Java APIs without any additional software installed; such as Microsoft Office, Apache Open Office, Adobe Acrobat Reader etc. Developers can easily view all popular images and document types including Microsoft Office, OpenDocument, HTML, PDF, Archive, Diagrams, Photoshop, AutoCAD and programming language formats inside the Java applications with fast and highest quality rendering.
Learn more
About illustration

Ready to get started?

Try GroupDocs.Viewer features for free or request a license

Render other file formats using Java

Multi-format documents and images viewer API for Java. View some of the popular file formats below without any external viewers.

 English