Document rendering solution

Render & view RTF in Java

Native and high performance RTF 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 RTF file in Java

With GroupDocs.Viewer you can render RTF 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 RTF file with full path.
  3. Set options to render RTF file into HTML, PNG, JPEG or PDF format.
  4. Render file and check output in the current directory.
Copy

// Set up input RTF file
String filePath = "input.rtf";

// Instantiate GroupDocs.Viewer
try (Viewer viewer = new Viewer(filePath))
{
    // Set view options
    HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources();
        
    // Render RTF file to HTML with embedded resources
    viewer.view(viewOptions);
}
<dependencies> <dependency> <groupId>com.groupdocs</groupId> <artifactId>groupdocs-viewer</artifactId> <version>24.8</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?

Download GroupDocs.Viewer for free or get a trial license for full access!

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.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English