PDFOne (for Java™)
Create, edit, view, print & enhance PDF documents and forms on Java™ platform
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 Free Online Document-Processing Tools
Gnostice Apps

Gnostice Apps provides several PDF document-processing services over the Web. It enables you to merge, split, convert, secure and redact PDF documents - all for FREE. All you need to access these services is a HTML5-capable browser such as the latest version of Firefox/Seamonkey or IE 11.

Our Developer Tools
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.

XtremePDFConverter VCL

A Delphi/C++Builder component to intelligently convert PDF to user-friendly Word RTF documents.

PDFOne .NET

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

XtremeDocumentStudio .NET

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

PDFOne (for Java™)

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

XtremeFontEngine (for Java)

Java font engine to render glyphs from Type 1, Type 2 (CFF), and TrueType fonts

Our Office Productivity Applications
Free PDF Reader

A free, fast, and portable application for viewing, printing and converting PDF documents.

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

This site is best viewed on a screen with minimum resolution of 1152 x 864 pixels. Windows XP users are advised to use Microsoft ClearType Tuning for optimal experience. Also, please use the latest version of a standards-compliant browser such as Firefox, Opera, or Dragon (Chromium).