Java Viewer API - display documents within your applications

API to view over 50 document formats from any Java based application without requiring any external viewers.

  Download Free Trial
Java Viewer API

GroupDocs.Viewer for Java


GroupDocs.Viewer for Java is a compelling document viewer API. Use it within your Java applications for rendering more than 50 documents and image formats. It rasterizes both documents and images. This Java API renders text from documents and converts it to SVG, HTML and CSS – offering native file rendering with high fidelity true-text.

Advanced Java Document Viewer API Features



Easy Integration


Render email attachments


HTML Representation : Rasterize documents and convert them to SVG+HTML+CSS


Image Representation: Rasterize documents and convert them to image format


PDF Representation: Convert documents to PDF format for displaying


Display documents in your application in its original format


Use Cache feature for fast loading only for HTML5 and image representation


Rotate Pages: supported with only HTML5 and Image representations


Reorder Pages: only for HTML5 and Image representations


Watermark: Add text as watermark to all pages and images of the output

Quick & Reliable Document Viewer API

Viewer API has the ability to quickly display different document formats with just a few lines of code. It's simple

Get image representation of the document pages - Java

 // Set viewer configuration
ViewerConfig  config = new ViewerConfig();
 // Create ViewerHandler
ViewerImageHandler _imageHandler = new ViewerImageHandler(config);
 // Get images
List<PageImage> pages = (List<PageImage>) _imageHandler.GetPages("sample.docx");

Installation and Usage

GroupDocs.Viewer for Java library files can be installed/downloaded directly as:

Fat version
    • Download the library from the download archive.
    • Extract the archive.
    • Open console and cd to lib directory of the extracted directory.
    • Run command mvn install:install-file -Dpackaging=jar -Dversion=3.0.0 -DgroupId=com.groupdocs -DartifactId=groupdocs-viewer -Dfile=GroupDocs.Viewer.jar or just run the install_library.bat to install library in maven

Note: version number and file name can be different from current documentation.

  • Add dependency to your pom.xml
Slim version

This library is hosted in the Maven Central Repository, so if you use Maven in your projects just use the dependency declaration provided above.

The jar itself you can download from the Maven Central Repository.

Another way to use.

All it takes to start rolling with GroupDocs.Viewer is to reference a single GroupDocs.Viewer.jar file.

If you download the Zip Archive as discussed in the previous topic then you are required to add the external library by practicing the following steps in Eclipse:

  • Right click on Java project, and go to Properties.
  • Go to Java Build Path.
  • Open Libraries tab.
  • Press Add External JARs.., and load GroupDocs.Viewer Jar.

Support and Learning Resources


GroupDocs.Viewer offers individual file viewer APIs for other popular development environments as listed below: