Java PDF Viewer for your Java Applications
Providing everything needed to embed customizable PDF Reader in a Java client API
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
How It Works
JPedal is supplied as a jar which can be accessed directly from your code.
Add the IDRsolutions repository to your pom.xml file:
CopyCopied!<repositories>
<repository>
<id>IDRsolutions</id>
<name>IDR Solutions</name>
<url>https://maven.idrsolutions.com</url>
</repository>
</repositories>
Add the JPedal dependency to your pom.xml file:
CopyCopied!<dependencies>
<dependency>
<groupId>com.idrsolutions</groupId>
<artifactId>jpedal-trial</artifactId>
<version>2023.05</version>
</dependency>
</dependencies>
Add these lines of code into your Java code:
Viewer viewer = new Viewer();
viewer.setupViewer();
viewer.executeCommand(ViewerCommands.OPENFILE, "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 PDF Viewer Key Features
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

Continuous Mode

Continuous Facing Mode

Facing Mode

Page Flow Mode
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

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

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

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

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.

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
Get started with your free JPedal trial now
Add the IDRsolutions repository to your pom.xml file:
CopyCopied!<repositories>
<repository>
<id>IDRsolutions</id>
<name>IDR Solutions</name>
<url>https://maven.idrsolutions.com</url>
</repository>
</repositories>
Add the JPedal dependency to your pom.xml file:
CopyCopied!<dependencies>
<dependency>
<groupId>com.idrsolutions</groupId>
<artifactId>jpedal-trial</artifactId>
<version>2023.05</version>
</dependency>
</dependencies>
Add the IDRsolutions repository to your build.gradle file:
CopyCopied!repositories {
maven {
url = "https://files.idrsolutions.com/dl/maven/"
}
}
Add the JPedal dependency to your build.gradle file:
CopyCopied!dependencies {
implementation 'com.idrsolutions:jpedal-trial:2023.05'
}