On this page
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:
c++
// Declare a callback function and implement it, using convenient lambda expressions here.
auto progress = [](int current_page_count, int total_page_count) {
// The first parameter is the currently converted page, and the second parameter is the total pages of the PDF document.
std::cout << "convert rate: " << current_page_count << "/" << total_page_count << std::endl;
};
ConvertOptions opt;
// pdf to word
PDFToOffice::StartPdfToWord("input.pdf", "password", "path/output", opt, progress);