X
  • March 10, 2015

Out of the Box Free Java PDF Viewers

Geertjan Wielenga
Product Manager

Here's a really handy tip for you if you're at NASA, Boeing, etc, creating large software on top of the NetBeans Platform—at some stage you probably need a PDF viewer of some kind as part of your application. Before trying to figure out how to create and integrate a PDF viewer, simply go here:

http://plugins.netbeans.org/plugin/52568

That brings you here:

https://www.idrsolutions.com/open-fx/downloads/

And then a few clicks later you have JARs, and source code, that integrate three different kinds of PDF viewers into your application. The plugin gives you a choice of three different PDF viewers, together with a window named "PDFTopComponent". Hence, if you don't want to do anything with the sources, simply bundle the JARs and then refer to the PDFTopComponent in your own code:

TopComponent tc;
     //this gives me a new window each time
     tc=new PDFDisplayTopComponent(pathToFile,viewerType);
     tc.open();
     tc.requestActive();

The three different types of viewer are shown below, as well as the fact that they even render music notation very well.

These are really great and IDRSolutions have done a wonderful job making these available.

Join the discussion

Comments ( 2 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services