Add a PDF Viewer to your Java Applications

JPedal provides everything you need to embed a customizable PDF Reader in Java Client Applications.

Display PDF files in your Java Applications

JPedal provides a complete Java PDF Viewer which is easy to integrate and customise into your Java applications as a Swing Component.

Complete PDF Viewer

Complete PDF Viewer

How It Works

JPedal is supplied as a jar which can be accessed directly from your code.

1. Add the IDRsolutions repository to your pom.xml file:

        <name>IDR Solutions</name>

2. Add the JPedal dependency to your pom.xml file:


3. Add these lines of code into your Java code:

Viewer viewer = new Viewer();viewer.setupViewer();viewer.executeCommand(Commands.OPENFILE, new Object[] {"pdfFile.pdf"});
ConvertPagesToImages.writeAllPagesAsImagesToDir("inputFileOrDir", "outputDir", "bmp", 1.33f);
ArrayList<Float[]> resultsForPages = FindTextInRectangle.findTextOnAllPages("/path/to/file.pdf", "textToFind");
PrintPdfPages print = new PrintPdfPages("C:/pdfs/mypdf.pdf"); if (print.openPDFFile()) {    print.printAllPages("Printer Name");}
ExtractClippedImages.writeAllClippedImagesToDir("inputFileOrDirectory", "outputDir", "outputImageFormat", new String[] {"imageHeightAsFloat", "subDirectoryForHeight"});
ExtractTextAsWordList.writeAllWordlistsToDir("inputFileOrDirectory", "outputDir", -1);
final PdfUtilities utilities = new PdfUtilities("path/to/exampleFile.pdf"); try {    if (utilities.openPDFFile()) {        // Returns a String containing all metadata fields for the document        final String documentPropertiesAsXML = utilities.getDocumentPropertyFieldsInXML();         // Returns the total page count as an int        final int totalPageCount = utilities.getPageCount();         for (int i = 1; i != totalPageCount; i++) {            // Get the page dimensions for the specified page in the given units and type            final float[] pageDimensions = utilities.getPageDimensions(i, PdfUtilities.PageUnits.Pixels, PdfUtilities.PageSizeType.CropBox);             // Returns the image data as a String for the specified page            final String xImageDataForPage = utilities.getXImageDataForPage(i);        }    }}catch (final PdfException e) {    e.printStackTrace();}utilities.closePDFfile();
WritableAnnotation[] annotations = new WritableAnnotation[2];annotations[0] = new SquareAnnotation(1, 10, 10, 100, 100);annotations[1] = new CircleAnnotation(2, 10, 10, 100, 100);AnnotationWriter.writeAnnotations(inputFile, outputFile, annotation);

What do other Developers think?

JPedal Viewer Key Features

JPedal allows developers to integrate a complete PDF Viewer inside their own Java Applications.

View pages in Multiple Modes

JPedal provides all the display modes present in Adobe Acrobat along with Page turning and its own unique Page Flow mode.

Single Page Mode

Single Page Mode

Continuous Mode

Continuous Mode

Continuous Facing Mode

Continuous Facing Mode

JPedal Facing Mode

Facing Mode

Page Flow Mode

Page Flow Mode

Navigate Documents

JPedal supports all PDF Document navigation features including Bookmarks and Layers.

Bookmarks shown if included

Bookmarks shows if included

Dynamic support for Layers

Dynamic support for Layers

Page Scrolling

Page Scrolling

ToolBar and keyboard shortcuts

ToolBar and keyboard shortcuts

Print PDF Files

JPedal can print PDF files directly from the PDF Viewer.

  • Select any available printer
  • Preview output in GUI window
  • Specify the scaling, page margins and resolution
  • Choose any page range including odd or even pages or any sequence.
  • Print in grayscale
  • Print in fast draft mode
  • Choose paper source by PDF page size
JPedal Viewer Example

Display/Edit PDF Forms

JPedal includes full suppport for PDF forms.

  • Display orginal AcroForms
  • Support for pure/mixed/legacy XFA PDF forms
  • Convert Forms into editable Swing widgets
  • Resave Form data back to PDF file
  • AP streams used if available
  • Display of form signatures supported
JPedal Viewer Example

Find / Search Text

JPedal can search for text directly from the PDF Viewer.

  • Search one page or the whole document
  • Use Regular Expressions
  • Restrict search results to whole words
  • Search with case sensitivity
  • Allow search results across multiple lines
  • Ignore space characters when searching
JPedal Viewer Example

Add / Edit PDF Annotations

JPedal can only view but also edit and add annotations to PDF files.

  • Edit existing Annotations
  • Add new Annotations
  • Resave edited file
  • GUI Drag and Drop editor
JPedal Annotations Example

Zoom, Scale, Rotate PDF Pages

JPedal can dynamically change the view with scaling and rotation options.

  • Clockwise and anti-clockwise rotation
  • Scale in or out by any percantage
  • Fit to Page, Width, Height
  • Pages are dynamically resampled to optimise image shown at given scaling.
JPedal Scaling and Rotation Example

Restrict user access to a PDF file

JPedal makes it very easy for Java Developers to remove any Viewer functionality, locking down access and preventing access to the PDF files.

  • Disable printing
  • Keep document in memory
  • Prevent text copying
  • Disable load and save
  • Add custom operations
  • Remove any menu option or button

Customise Viewer Appearance

JPedal makes it very easy for Java Developers to change the Look and Feel Used.

  • Change colours
  • Different fonts
  • Prevent/change pop-up messages
  • Unique icons
  • Internal Frame
  • Menu text


We have extensive documentation showing you how to use the Java PDF Viewer. Find out how you can add the Viewer into your Java application with just 2 lines of code.

Get started with your free JPedal trial now

Download the trial JAR using this link

Download Started

Thank you for your interest in JPedal! Here are a few tips to help you get started with the trial:

  • Find out more about the trial and getting started on the Trial page
  • Learn more about JPedal on our dedicated support website
  • Or if you'd be interested in buying a JPedal licence and would like more help, please arrange a call with us here