Skip to content
ComPDF
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 callback functions. The following example demonstrates how to get the conversion progress while performing a PDF to Word task.

python
def progress_callback(current: int, total: int):
  print(f"Progress: {current} / {total}")

callback = ConvertCallback()
callback.set_progress(progress_callback)