Start Your JPedal Trial
How to get JPedal
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.09</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.09'
}
Your download has started
Start solving your PDF problems now
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);
More information about viewing PDF files in JavaMore information about converting PDF files to imagesMore information about searching PDF filesMore information about printing PDF filesMore information about extracting images from PDF filesMore information about extracting text from PDF filesMore information about extracting metadata from PDF filesMore information about annotating PDF files in Java