Cancel Conversion Task
ComPDF Conversion SDK supports interrupting your ongoing conversion task at any time through the cancel callback in CConvertCallback. When the cancel callback returns true, the current conversion task stops as soon as possible.
c++
bool Cancel()
{
return false;
}
ConvertOptions opt;
CConvertCallback callback = {};
callback.handle = nullptr;
callback.progress = nullptr;
callback.cancel = Cancel;
CPDFConversion::StartPDFToWord("input.pdf", "password", "path/output.docx", opt, &callback);If you need to cancel the conversion at a specific time, you can return true from Cancel based on external state.