Spire.PDF for Java 9.9.6 已发布。本次更新新增支持将 PDF 转换为 SVGZ 及比较 PDF 文档,同时还增强了从 PDF 到 Excel、SVG 和 PPTX 的转换功能。此外,该版本还修复了一些已知问题,如加载 PDF 文档时程序抛出“PDF file structure is not valid”异常的问题。详情请阅读以下内容。
新功能:
- 提供了XlsxSpecialTableLayoutOptions 接口优化了转换含表格的PDF到Excel的格式效果。
- 支持将PDF转换到SVGZ。
- 同步了比较PDF文档内容的功能到JAVA。
PdfDocument document=new PdfDocument();
document.loadFromFile("input.pdf");
XlsxSpecialTableLayoutOptions options=new XlsxSpecialTableLayoutOptions(false, false, false);
document.getConvertOptions().setPdfToXlsxOptions(options);
document.saveToFile("output.pdf", FileFormat.XLSX);
document.saveToFile("output.svgz", FileFormat.SVGZ);
PdfDocument pdf1 = new PdfDocument(inputFile_1);
PdfDocument pdf2 = new PdfDocument(inputFile_2);
PdfComparer compare = new PdfComparer(pdf1, pdf2);
compare.getOptions().setPageRanges(0, pdf1.getPages().getCount() - 1, 0, pdf2.getPages().getCount() - 1);
compare.compare(outputFile);
问题修复:
- 修复了转换PDF到SVG后页面大小不一致的问题。
- 修复了转换PDF到PPTX后文本重复的问题。
- 修复了加载PDF文档时程序抛“PDF file structure is not valid”的问题。
- 修复了签名PDF时程序抛"NullPointerException"的问题。
获取Spire.PDF for Java 9.9.6请点击: