Link
Skip to main content

Viewing PDF files in JPedal’s Customizable Viewer

JPedal includes a very comprehensive PDF viewer which makes use of both Swing and optionally JavaFX for the best possible viewing solution. The Viewer is customizable allowing its appearance to be altered to best suit your needs.

The Viewer is written in Java but can be run from other languages or the command line.

JavaFX is an optional plugin that you can use to enable the page flow mode.

If you do not have JPedal, you can download a trial copy:

Download JPedal

View PDF files from Command Line or another language

java -jar jpedal.jar --view "inputFile.pdf"

View PDF files in a new window with Java

// If you want to set a look and feel
System.setProperty("org.jpedal.userControlledLAF", "javax.swing.plaf.metal.MetalLookAndFeel");

Viewer viewer = new Viewer();
viewer.setupViewer();
viewer.executeCommand(ViewerCommands.OPENFILE, "inputFile.pdf");

This uses the JPedal Viewer class. The Viewer defaults to using the look and feel of the operating system. If you want to change this fully, details can be found here.

See also How to add a PDF viewer to your Java application


Why JPedal?

  • Actively developed commercial library with full support and no third party dependencies.
  • Process PDF files up to 3x faster than alternative Java PDF libraries.
  • Simple licensing options and source code access for OEM users.

Learn more about JPedal

Start Your Free Trial


Customer Downloads

Select Download