Skip to content
Guides

Convert PDF to Word

Overview

Converting PDF to Word is an operation that converts the PDF format file into a editing Word format file. By converting PDF to Word, you can easily edit, modify, insert, or delete text and pictures, adjust layout and properties.

Layout differences

  • Streaming layout: The stream layout is convenient to edit, and the content is flowing in different positions as needed. However, due to the different effects in different software and hardware environments, such as the same Word document, in different versions of Office software or different resolution computers, the display effect is different, that is, the "run version" phenomenon phenomenon Essence Therefore, streaming files are not suitable for the carrier of documentation with high content and accurate layout, such as electronic documents, electronic certificates, electronic credentials, etc.
  • Reserved page layout: The fixed page layout will not be "running", and the display and printing effect on any device is highly accurate and consistent. The content, location, style, etc. in the file are fixed when generating files, etc., and others are not easy to modify and edit. The content of the modified content is small, and other layouts will not be modified. Main application scenarios: some more serious and formal occasions, such as business documents, electronic documents, electronic vouchers, electronic certificates, etc.

Sample

This sample demonstrates how to convert from a PDF to docx files.

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 = onProgressCal, 
onPost = onPostCal)