How to Create a Web-Based Viewer in Java In the following tutorial, we will detail how to create an HTML embed code for a simple web-based document viewer using an API in Java. by Join the DZone community and get the full member experience.Join For Free A web-based viewer is essentially a basic visual display window for documents you want users to be able to explore on your website or application. Document viewers are a great way to get a quick look at a document without worrying if you have the correct applications to view it on your device. With these tools, customers can simply click on a PDF or Word document on a website and peruse it as they would in its native format.