Java PDF Viewer Tutorials
This page provides a list of code examples and tutorials for viewing PDF files in Java. It shows how to add viewing to your Java code using the JPedal PDF library. If you do not see what you are looking for, please contact us and we will try to help.
List of code examples
All these examples are included in the demo and full versions of JPedal. They give details on how to run each directly from the jar and any useful options. We also provide links to the source code so you can use the code in your own programs and tailor it to your exact requirements.
- SimpleViewer is a very comprehensive Java PDF viewer. Shows off the full power of the library.
- MultiViewer adds the ability to open; multiple PDF files in separate panes to the SimpleViewer.
- JPanelDemo is a very simple Java PDF viewer with minimal functionality.
- PageFlowPanel provides a simple example of how to integrate PageFlow3D into your application.
- AppletViewer provides a version of Java PDF viewer running as an Applet.
PDF Viewer tutorials
The tutorials show you how to easily add PDF Viewing capabilities to your Java software and customise it.
Use the JPedal Viewer in your own code
- Add a PDF Viewer in 2 lines of code shows how to very easily add PDF support into a Swing application.
- Getting started shows a beginner how to launch the PDF Viewer as a standard application.
- Configuring the Java PDF viewer properties shows how to customise our viewer using the properties file.
- Use JPedal as your Default PDF viewer in Windows - gives step by step instructions for using the JPedal SimpleViewer example as your default PDF viewer application in Windows XP or Vista.
Using JPedal JavaBean in Matisse GUI Designer
- Use the SimpleViewer JavaBean component in NetBeans IDE details how to rapidly develop your PDF applications through the NetBeans GUI Builder Matisse by utilizing the SimpleViewer JavaBean component.
Customize, configure and extend the PDF Viewer
- Adding your own commands explains how to easily add your own menu or button options to theViewer applications.
- Disable existing menus explains how you can fully customise the existing PDF Viewer with the easy to user preferences window.
- Add your own menu items explains how you can access the different gui interfaces to add your own buttons.
- Access Viewer functions covers how to access the PDF Viewer from your own application.
- Add your own action implementation change the default behaviour of any button or menu in the PDF viewer to perform your own custom action.
- Draw additional objects explains how to draw your own objects ontop of the PDF display (ie special Annotations, copyright notice).
- Highlighting PDF text shows how to highlight PDF text onscreen
- Text to Speech shows how to have the PDF Viewer speak back highlighted text.
Videos
Demo of drag and drop functionality in PDF Viewer.
Making a Flex PDF Viewer
Flex tutorial on using JPedal with flex to build an online PDF viewer.
General tutorials
- Convert PDF to grayscale or black and white tutorial explains how JPedal can be configured to produce either output rather than colour for printing, display and thumbnails.
- Custom JPedal settings lists options which can be altered to alter printing, display attributes and other settings.
- Using custom interfaces explains how external code can be 'plugged' into JPedal to enhance or alter functionality.
- Stop PDF form object being printed explains how you can disable the PDF printing of any types of PDF Form widget.
- PDF Forms tutorials provides a set of tutorials explaining PDF form functionality, how to customise PDF form components and how to add your own Java listeners to PDF form objects.
- PDF Layers tutorial explains how to enable/disable PDF Layers.
- Running SimpleViewer as an applet explains how to deploy the PDF viewer as an applet.
- Introductory tutorial on plugins shows how to use the free PDF plugin for Eclipse, IDEA and Netbeans.




