Skip to content
Guides

Convert PDF to RTF

Overview

RTF is a popular text format that can retain the format and style data of the text, and it is convenient for most text readers to read and write. Integrate ComPDFKit Conversion SDK to conevert PDFs to RTF files now.

Sample

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

kotlin
val cPDFConvert = CPDFConverterRtf(context, uri, "")

val params = CPDFConvertRtfOptions().apply {
     isContainImages = true
     isContainAnnotations = false
}

val result: ConvertError = cPDFConvert.convert(outputDir, outputFilenameNoSuffix, params, pageArrays, 
onHandle = onHandleCal, 
onProgress = onProgressCal, 
onPost = onPostCal)