On this page
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 PDF to RTF files now.
Sample
This sample demonstrates how to convert from a PDF to RTF file.
objective-c
// Get the path of the PDF file.
NSString *pdfPath = @"...";
// Get the path of the RTF file.
NSString *outputPath = @"...";
CPDFConvertRtfOptions * options = [[CPDFConvertRtfOptions alloc] init];
[options setIsContainAnnotations:NO];
[options setIsContainImages:NO];
[options setIsAllowOCR:YES];
[options setLanguage:COCRLanguageEnglish];
CPDFConverterRtf *converter = [[CPDFConverterRtf alloc] initWithURL:[NSURL fileURLWithPath:pdfPath] password:nil];
[converter convertToFilePath:outputPath pageIndexs:nil options:nil];