Skip to content
Guides

Conversion Guides

ComPDFKit Conversion SDK allows developers to use a simple API to convert PDF to the most commonly used file formats like Word, Excel, PPT, HTML, CSV, PNG, JPEG, RTF, CSV,etc. Provide a wealth of customized conversion options, such as whether to include images or annotations in PDF documents, whether to enable OCR or layout analysis, etc.

Get Conversion Progress

ComPDFKit 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:

php
class PHPCallbackOp extends \CallbackOp {
    public function __construct() {
        parent::__construct();
    }

    public function handle($current_page_count, $total_page_count) {
        echo 'current page count:' . $current_page_count . "\n";
        echo 'total page count:' . $total_page_count . "\n";
    }
}

$handler = new PHPCallbackOp();
$options = new \ConvertOptions();

$code = startPdfToWord('input.pdf', 'password', 'path/output', $options, $handler);