Render Documents to HTML5 with Cloud Java SDK

Are you working on a document viewer application in Java? Do you want to have a single solution for viewing all common file formats? There is good news for you, you can render MS Office, PDF and many other file formats to HTML5 with GroupDocs.Viewer Cloud SDK for Java. So that documents of different types can be easily displayed inside your application without any additional software installed (like MS Office, Apache Open Office, Adobe Acrobat Reader and others).

GroupDocs.Viewer Cloud is a platform independent document rendering and viewing solution. It allows you to display over 80 industry standard document types in your application. The main purpose of GroupDocs.Viewer Cloud is an ability to render documents into HTML, Image or PDF representations fast and with high quality. In this post, I’ll keep focus on HTML5 output.

Now, l’ll show you how easily you can render your input document to HTML5 with few line of code. As stated earlier, I am going to use GroupDocs.Viewer Cloud SDK for Java in this post. However, if you’re using some other programming language, then you can check SDK of your choice from our GitHub repository. It contains the SDKs for all popular programming languages. It enables the developers to use GroupDocs.Viewer Cloud directly in their applications without worrying about underlying REST API calls.

Here we go!

Step 1:

Before we begin with coding, sign up with groupdocs.cloud to get your APP SID and APP Key.

Step 2:

GroupDocs Cloud hosts all its Java SDKs on Maven repository. Create a new Maven project and add following Maven Repository configuration / location in your Maven pom.xml as below to use groupdocs-viewer-cloud.

<repository>

    <id>groupdocs-artifact-repository</id>

    <name>GroupDocs Artifact Repository</name>

    <url>http://repository.groupdocs.cloud/repo</url>

</repository>

<dependency>

    <groupId>com.groupdocs</groupId>

    <artifactId>groupdocs-viewer-cloud</artifactId>

    <version>19.5</version>

    <scope>compile</scope>

</dependency>

Step 3:

Copy following sample Java code to your Java class. We’re converting DWF file to HTML5.

Step 4:

Run the code, and that’s it. The API response includes the URL of the resultant HTML to download for post processing as per your requirement.

Explore more code samples of GroupDocs.Viewer Cloud SDK for Java from GitHub.

Got a question or a suggestion? Please feel free to drop us a comment below or post a question in the support forum. It helps us to continually improve and refine our API.