PDFOne (for Java)
Create, edit, view, print & enhance PDF documents and forms in Java SE/EE
Compatibility
J2SE J2EE Windows Linux Mac (OS X)

A Java PDF Web Viewer - Powered By PDFOne (for Java™)

Showcasing an online PDF web viewer built using Gnostice PDFOne, our PDF component suite for Java™ developers.
By V. Subhash

Java's Write Once, Run Anywhere moto allows Java applications to run on a variety of platforms. This allows Java applications to be downloaded from a website and run inside a browser.

Inside a browser though, Java runs under a lot of restrictions. To give more freedom for Java applications to access system resources, you can bundle them as JNLP (Java Network Launching Protocol) clients using the Java Web Start framework.

In this article, we present you an online Java PDF viewer built by Gnostice DevTools Team member L. Santhanam using our PDFOne (for Java ™) library.

Screenshot 1: The Demo Can Display A Local PDF Document Inside A Browser

Online PDF Viewer Demos

Here are the demos. (You need the latest Sun JRE (Version 6 Update 20 or later) for these demos. You can download the JRE from the Java website. If you are using a Mozilla browser in Windows, you can simply update your Java plugin to get the latest JRE. Linux users, please see note below.)

  1. Download and run the demo outside this browser - click here.
  2. Run the demo as an applet inside this web page - click here.

How To Run The Demos

To run the first demo, download it and run it from your computer using Java Web Start Launcher. You may find it with the pathname C:\Program Files\Java\jre6\bin\javaws.exe.

Screenshot 2: Run The Demo With Java Web Start Outside the Browser

The second demo will run directly within this web page. When the Java application loads, Java will show a certificate prompt. Simply click the Run button on the prompt. Do not add the signature to your computer, as Santhanam had used only a demo certificate to sign the JAR files.

Screenshot 3: Digital Signature Prompt Before Running The Demo
---o0O0o---
Notes
  1. Both demos show trial marks.
  2. For Linux Users: Linux distributions now use the open source IcedTea Java runtime rather than HotSpot runtime from Sun. IcedTea is usually enough for most Linux users. However, there are some PDFOne components work best with HotSpot (Sun JRE) rather than IcedTea. As a result, these demos require Sun JRE. You can find installation steps for Sun JRE in Linux in another article. After following those steps, you need to ensure your browser uses the plugin from that JRE. If you are using Firefox in Linux, you need to create a symbolic link for the Linux Java plugin file in the Firefox plugins folder. On my Ubuntu Linux (Lucid Lynx) system, I searched for the Firefox plugins folder. I found it at /usr/lib/firefox-3.6.3/plugins. I found the Sun Java plugin for Linux libnpjp2.so at /usr/java/jre1.6.0_20/lib/i386. There was a javaplugin-oji.so in another location. However, Sun says that this other file is a classic plugin and should not be used. Finally, I created the symbolic link using the following commands in Terminal.
    cd /usr/lib/firefox-3.6.3/plugins
    sudo ln -s /usr/java/jre1.6.0_20/lib/i386/libnpjp2.so  .
    
    You can check your plugin installation by typing about:plugins in the Firefox address box.
    Screenshot 4: Check Whether Plugins Have Been Installed Properly
    Screenshot 5: PDF Viewer Applet Running Inside Firefox In Linux

---o0O0o---

Our Cloud-based document-processing
Gnostice StarDocs

Gnostice StarDocs is a scalable, fault-tolerant document-processing server solution, designed to be the central go-to place for all kinds of electronic document-processing work. StarDocs includes a web application (as seen at stardocs.gnostice.com) that frees your end-users from the need to have format-specific software to merge, split, redact, convert, edit, and sign documents - all they need is a network connection and a HTML5 browser. StarDocs provides a REST-based API that your developers can use to add document-processing functions to a variety of software applications. As the REST API is platform agnostic, your developers can write software on a wide variety of platforms - from desktop to mobile devices to Web services in any development language. To get them started quickly, StarDocs is supported by language-specific native SDK. StarDocs document server has load-balancing built-in and is designed to be scalable across enterprise Intranets and the Internet. StarDocs is available as packaged software for on-premise hosting and also as a subscription-based cloud service.

Our Delphi/C++Builder developer tools
XtremeDocumentStudio Delphi

Multi-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms.

eDocEngine VCL

A Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools.

PDFtoolkit VCL

A Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents.

Our .NET Developer Tools
XtremeDocumentStudio .NET

Multi-format document-processing component suite for .NET developers.

PDFOne .NET

A .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications.

Our Java developer tools
XtremeDocumentStudio (for Java)

Multi-format document-processing component suite for Java developers.

PDFOne (for Java)

A Java PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java applications.

Privacy | Legal | Feedback | Newsletter | Blog | Resellers © 2002-2015 Gnostice Information Technologies Private Limited. All rights reserved.