We're pleased to announce the release of Spire.PDF for Java 12.1.4. This version adds support for saving PDF comparison results directly to file streams. In addition, multiple issues related to PDF conversion, rendering, printing, and stability have been fixed, with further improvements made to performance and layout accuracy. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New feature | SPIREPDF-7880 | Added support for saving PDF comparison results to file streams.
// Create a new PdfDocument object 'pdf1' to work with the first PDF file
PdfDocument pdf1 = new PdfDocument();
// Load the first PDF file from the specified path
pdf1.loadFromFile("ComparePdfDocument_1.pdf");
// Create a new PdfDocument object 'pdf2' to work with the second PDF file
PdfDocument pdf2 = new PdfDocument();
// Load the second PDF file from the specified path
pdf2.loadFromFile("ComparePdfDocument_2.pdf");
// Create a PdfComparer object 'compare' with 'pdf1' and 'pdf2' as parameters for comparison
PdfComparer compare = new PdfComparer(pdf1, pdf2);
// Set the page ranges to be compared using the options of the comparer
compare.getOptions().setPageRanges(0, pdf1.getPages().getCount() - 1, 0, pdf2.getPages().getCount() - 1);
String result = "output.pdf";
File outFile = new File(result);
// Create an output stream to write the document to the output file
OutputStream outputStream = new FileOutputStream(outFile);
// Compare the PDF documents and save
compare.compare(outputStream);
// Dispose of system resources associated with 'pdf1'
pdf1.dispose();
// Dispose of system resources associated with 'pdf2'
pdf2.dispose();
|
| Bug | SPIREPDF-6373 | Optimized performance when converting PDF documents to images. |
| Bug | SPIREPDF-6406 | Fixed an OutOfMemoryError that occurred during OFD to PDF conversion. |
| Bug | SPIREPDF-7189 | Improved the rendering quality of PDF to Word conversion results when opened in WPS. |
| Bug | SPIREPDF-7305 | Fixed inconsistent background colors and partial font rendering issues when printing PDFs. |
| Bug | SPIREPDF-7407 | Enhanced layout accuracy when converting PDFs to flowable Word documents. |
| Bug | SPIREPDF-7560 | Resolved an error related to PdfTrueTypeFont in multi-threaded environments. |
| Bug | SPIREPDF-7666 | Fixed incorrect content generation when using the "Yu Mincho" font. |
| Bug | SPIREPDF-7687 | Fixed text misalignment issues in PDF to PDF/A-1A conversion. |
| Bug | SPIREPDF-7782 | Fixed extra spaces appearing in extracted table content. |
| Bug | SPIREPDF-7820 | Resolved missing formulas when converting PDF documents to images. |
| Bug | SPIREPDF-7869 | Fixed overlapping text issues in PDF to HTML conversion. |
| Bug | SPIREPDF-7887 | Resolved the "structure is not valid" error when loading PDF documents. |
| Bug | SPIREPDF-7890 | Fixed an ArrayIndexOutOfBoundsException that occurred when saving PDFs after adding text watermarks. |
| Bug | SPIREPDF-7898 | Fixed content inconsistency issues during SVG to PDF conversion. |
| Bug | SPIREPDF-7910 | Resolved an error ("For input string: '36.8s'") during OFD to PDF conversion. |
| Bug | SPIREPDF-7911 | Fixed incorrect content issues in OFD to PDF conversion. |
Click the link below to download Spire.PDF for Java 11.12.16: