Java PDF Viewer Example

Our Swing PDF Viewer is a Swing component that can display, edit and print PDF documents. It offers many advanced features like form completion (including Digital Signatures), bookmarks, thumbnails, JavaScript, printing PDFs and more. It's easily customized and can be embedded in a Java application, run as a standalone application, from Java Web Start or run as a "PDF applet", as demonstrated here.

Currently we're displaying the PDF applet with the full set of Java controls, but it can also be controlled entirely from JavaScript - click here for a demonstration.

Currently we're displaying the PDF applet with no internal controls, using JavaScript and LiveConnect to control the PDF applet. To enable the Java controls, click here.

The PDF applet download is about 900KB. To open a PDF, select one from this list or open one from the local filesystem, either by using the open icon or by dragging a PDF file from your desktop onto the PDF applet (you will need to trust the PDF applet to do this).

Alternatively, here's a Java Web Start version of the same code. Download (800KB).

If you had Java Web Start installed in your browser, you'd also be able to run the viewer as a Java Web Start application.