This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Java PDF Viewer by GroupDocs

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

This post will be helpful for those of you who are looking for a Java PDF viewer or a universal document viewer library and have no time/resources for developing it from scratch.

Specifically, in the post I’m going to highlight key benefits and features of a Java PDF viewer which you can build based on the commercial library – GroupDocs.Viewer for Java. Hopefully, the post will be useful for the JavaRanch community, as the library can be seamlessly integrated into any Java app and save tons of time that you would have to spend when developing the PDF viewer yourself. So, here we go:

GroupDocs.Viewer for Java is a universal document viewer library built based on the client-server architecture. It allows you to display PDF, Microsoft Office, Visio, CAD, and over 50 other types of documents. Key features and benefits of the library include:

1. Secure document sharing. Unlike the client-based viewers, which visualize documents on the client side using a Java applet, Adobe Flash, Microsoft Silverlight or similar technologies, GroupDocs.Viewer for Java doesn’t pass original documents to client machines during view sessions. Instead, the library converts documents to a web-compatible content on the server and then renders it in clients’ browsers just like regular web-pages. This protects your content from potential security flaws, as the documents you share are not downloaded to end-user machines.

Combined with the DRM (digital rights management) feature, this allows you to prevent viewers from copying the documents you share. The DRM provides control over user access permissions, so that you can disable the download, print and copy/paste options for all or some of the displayed documents.

Also, to protect your documents from screen-grabbing, you can add watermarks. The watermarks are rendered over documents on the client-side, so that your original documents stay intact.

2. Zero footprint + cross-platform compatibility. Since the library converts documents to a web-compatible content, documents can be rendered in any modern web-browser, including IE8+, Safari5+, Chrome, FireFox and Opera. There is no need to install anything on the client side. End users can view PDF documents, for example, without having to install Adobe Acrobat Reader or any other plugins.

Furthermore, GroupDocs.Viewer for Java doesn’t have any 3rd party dependencies. So, no need to install any office software on the server too. The library comes as JAR package and can be easily integrated into your app hosted on any Java servlet container.

3. Different document rendering modes. GroupDocs.Viewer for Java allows you to choose between image-based and HTML-based document rendering modes. In the image-based mode, the library converts documents to raster images. When displaying textual documents, like PDF files, the library also extracts text and then renders it in a separate layer over the rasterized background. As a result, the final documents look sharp even when zooming in/out of the document.

Native text rendering also means that users can select and copy it to the clipboard right from documents displayed in a browser (this option can be disabled with the DRM feature).

The image-based mode has its drawbacks though. For example, when rasterizing a large PDF document that has a lot of pages, the rasterized copy may be quite heavy and require a decent bandwidth along with RAM and disk space to store it. This is where the HTML-based document rendering mode comes in handy.

When switched to the HTML-based rendering mode, GroupDocs.Viewer for Java converts documents to HTML markup, CSS and scalable SVG images. In the output you get much lighter content (as opposite to the rasterized documents) that needs to be transferred to clients.

4. Out-of-the-box UI. GroupDocs.Viewer for Java comes with a web UI which provides end users with controls for seamless navigation of multi-page documents in a browser. When viewing document through the UI, end users can:

  • Turn document pages like slides
  • Preview/navigate pages with thumbnails
  • Jump straight to the specified page
  • Search for text within the document
  • Select and copy text to the clipboard
  • Zoom in/out of the document
  • Rotate pages
  • Print or download the original document

  • As already mentioned, the print, download and text copy/paste options can be disabled, so that documents are displayed in a “read-only” mode. Alternatively, the library allows you to convert your documents to the PDF format, so that users can get only a PDF copy of the original document upon download.

    The web UI can be fully customized with your own styles and embedded into your app with just a few lines of JavaScript code or an iframe.

    5. Support for PDF, Microsoft Office and 50+ other document types. Along with PDF files, the library allows you to display documents of the following formats:

  • .doc(x), .docm, .dot, .dotx, .dotm
  • .xls(x), .xlsm, .xlsb, .xml
  • .ppt(x), .pps, .ppsx
  • .vsd, .vdx, .vss, .vsx, .vst, .vtx, .vsdx, .vdw
  • .mpp, .mpt
  • .eml, .msg, .emlx, .mht
  • .ods, .odt, .ott, .odp
  • .rtf, .txt
  • .csv
  • .html, .mht, .mhtml
  • .xps
  • .dxf, .dwg (2004)

  • ______________

    For more details on the GroupDocs.Viewer for Java library, please visit its homepage. We offer a free evaluation copy of the library that has several functional restrictions. Alternatively, you can contact our support for a free 30-day license to be able to explore the library without any restrictions. We also prepared a demo to help you get started quickly and build your custom Java PDF viewer based on it.

    Helpful Links:

    GroupDocs Website:

    GroupDocs.Viewer for Java – Product Home:

    Support Forum:
    Consider Paul's rocket mass heater.
      Bookmark Topic Watch Topic
    • New Topic