Spire.PDF for Java 12.5.1 adds support for PDF conversion progress callback

Spire.PDF for Java 12.5.1 adds support for PDF conversion progress callback

2026-05-19 09:30:16

We're pleased to announce the release of Spire.PDF for Java 12.5.1. This version adds support for progress callback when converting PDF. It also fixes several issues, including content inconsistency when converting SVG to PDF. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New Feature SPIREPDF-8044 Added support for progress callback when converting PDF documents.
class CustomProgressNotifier implements IProgressNotifier {
    StringBuilder str = new StringBuilder();
    private String outputFile;

    public CustomProgressNotifier(String outputFile) {
        this.outputFile = outputFile;
    }

    @Override
    public void notify(float progress) {
        str.append("==============Progress: ").append(progress).append("%==============\n");
        try {
            Files.writeString(Paths.get(outputFile), str.toString());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

//using 
PdfDocument pdf=new PdfDocument();
pdf.loadFromFile("test.pdf");
pdf.registerProgressNotifier(new CustomProgressNotifier("Progress.txt"));
pdf.saveToFile("out.docx", FileFormat.DOCX);
pdf.dispose();
Bug Fix SPIREPDF-7642 Fixed issue with content inconsistency when converting SVG to PDF.
Bug Fix SPIREPDF-7683 Fixed issue with incorrect validation results of digital signatures.
Click the link below to download Spire.PDF for Java 12.5.1: