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 in the ConvertCallback structure. The following example demonstrates how to get the conversion progress while performing a PDF to Word task.

c#
void GetProgress(int pageIndex, int total)
{
  // Add callback function code here.
}
OnProgress getPorgress += GetProgress;

ConvertCallback callback = new ConvertCallback();
callback.progress = Marshal.GetFunctionPointerForDelegate(getPorgress);

WordOptions wordOptions = new WordOptions();
CPDFConversion.StartPDFToWord("input.pdf", "password", "path/output.docx", wordOptions, callback);