Word document formats are documents formats of Microsoft Word. It might contain text, images, excel diagrams, and also OLE (Object Linking and Embedding) objects.
In this article, we will discuss how to convert Word to pdf and other formats in Java applications.
GroupDocs.Viewer for Java provides API to render Word document formats to PNG, PDF, JPEG, and HTML. Supported formats are DOC, DOCX, DOCM, DOT, DOTM, DOTX,
RTF, TXT documents, and many others.
Follow one of the ways as described in the Installation section to install and reference GroupDocs.Viewer for Java.
Here is a sample document to demonstrate rendering results:
How to render Word files into HTML, JPG, PNG, or PDF
Rendering to HTML with Embedded Resources in Java
To render your file to HTML file(s) with embedded resources do the following steps:
With Viewer class load your document.
With the forEmbeddedResources method create the HtmlViewOptions instance and type output file name.
Call view method to render your document to HTML, resources will be embedded in to file.
In order to use the API without evaluation limitations, you can get a free temporary license.
Conclusion
In conclusion, I hope you now know how to view Word files in Java applications, in this article you have seen how to convert Word to PDF, how to convert Word to jpg, and other formats in your application.
Also, you can use Online apps to view your files these applications are built with GroupDocs.Viewer.
You can learn how to use GroupDocs.Viewer in your applications with documentation and if you have any questions or issues you feel free to send these via our forum.