PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
ComPDF Conversion SDK obtains the conversion progress through the ProgressCallback interface. The following example demonstrates how to get the conversion progress while performing a PDF to Word task.
// Implement the `ConvertCallback` interface to receive conversion progress updates.
class ConversionTask(
var path: String,
var outputPath: String,
var options: WordOptions
) : ConvertCallback {
override fun onProgress(current: Int, total: Int) {
println("progress: $current / $total")
}
override fun isCancelled() {
return false
}
fun startTask() {
val errorCode = ComPDFKitConverter.startPDFToWord(path, "", outputPath, options, this)
}
}