On this page
Guides
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:
kotlin
val cPDFConvert = CPDFConverterWord(context, uri, "")
val params = CPDFConvertWordOptions().apply {
isContainImages = true
isContainAnnotations = true
layoutOptions = LayoutOptions.RetainFlowingText
}
val result: ConvertError = cPDFConvert.convert(outputDir, outputFilenameNoSuffix, params, pageArrays,
onHandle = onHandleCal,
onProgress = { current: Int, total: Int ->
Log.d(Tag, "onProgress: $current - $total")
},
onPost = onPostCal)