Get Conversion Progress
ComPDF Conversion SDK obtains the conversion progress through callback functions. The following example demonstrates how to get conversion progress while performing a PDF to Word task.
ruby
callback = ComPDFKitConversion::ConvertCallback.new(
progress: ->(current_page, total_page) {
puts "progress: #{current_page}/#{total_page}"
}
)Pass the callback through the callback: keyword argument:
ruby
result = ComPDFKitConversion::Conversion.start_pdf_to_word(
input_file_path,
"",
output_file_path,
ComPDFKitConversion::ConvertOptions.new,
callback: callback
)