Skip to content
ComPDF
DemoFAQ
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

Get Conversion Progress

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

js
const callback = {
  onProgress(currentPage, totalPage) {
    console.log(`progress: ${currentPage}/${totalPage}`);
  }
};

Pass the callback as the fifth conversion argument:

js
const result = sdk.startPDFToWord(
  inputFilePath,
  "",
  outputFilePath,
  {},
  callback
);