快速、轻盈的 Java PDF 阅读器,专为开发者设计
在任何 Java 客户端应用程序中嵌入 PDF 阅读器
Viewer viewer = new Viewer();
viewer.setupViewer();
viewer.executeCommand(ViewerCommands.OPENFILE, "pdfFile.pdf");
ConvertPagesToImages.writeAllPagesAsImagesToDir("inputFileOrDir", "outputDir", "bmp", 1.33f);
ExtractTextAsWordList.writeAllWordlistsToDir("inputFileOrDirectory", "outputDir", -1);
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");
}
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);
ExtractClippedImages.writeAllClippedImagesToDir("inputFileOrDirectory", "outputDir", "outputImageFormat", new String[] {"imageHeightAsFloat", "subDirectoryForHeight"});
其他开发者怎么评价我们的 PDF SDK?
JPedal Java PDF 阅读器的主要功能
JPedal 提供了一个纯净的 Java PDF 阅读器,可自定义、可轻松集成到您的 Java 应用程序中,作为 Swing 组件使用。功能包括:
限制用户对 PDF 文件的访问权限
JPedal 使得 Java 开发者可以轻松地移除阅读器里的任何功能,从而限制/防止用户访问 PDF 文件。
- 禁用打印功能
- 保持文档一直在内存中
- 禁止文本复制
- 禁用加载和保存功能
- 添加自定义操作
- 移除任何菜单选项或按钮
自定义阅读器外观
Java 开发者可以轻松地改变 JPedal 的界面外观和风格。
- 暗色模式
- 更改颜色
- 不同的字体
- 防止/更改弹出消息
- 独特的图标
- 内部框架
- 菜单文本
为什么选择 JPedal?
1.
定期更新的企业级 Java PDF 库,提供完整的技术支持且不存在依赖第三方库的问题。
2.
处理 PDF 文件的速度比其他 Java PDF 库快最多 3 倍。
3.
简单的许可证选项,并为 OEM 用户公开源代码。