Skip to content
DemoFAQ

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

Get Conversion Progress ​

ComPDF Conversion SDK obtains the conversion progress through the ProgressCallback interface. The following example demonstrates how to get the conversion progress while performing a PDF to Word task.

java
class ProgressClass implements ConvertCallback {
    boolean cancelled = false;

    @Override
    public void onProgress(int current, int total) {
        System.out.printf("Current Progress: %d / %d%n", current, total);
    }

    @Override
    public boolean isCancelled() {
        return cancelled;
    }
}

CPDFConversion.startPDFToWord("word.pdf", "", "path/output.docx", new WordOptions(), new ProgressClass());