PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
ComPDF Conversion SDK supports interrupting your ongoing conversion task at any time. The following example demonstrates how to interrupt your ongoing conversion task.
class ProgressClass implements ConvertCallback {
// When the conversion task is running, set `cancelled` to true to interrupt the ongoing conversion task.
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());