iOS
ComPDFKit Conversion SDK
Guides

Convert PDF Documents to Word Documents

 

// Get the path of the PDF file.
NSString *pdfPath = @"...";
// Get the path to the Word file.
NSString *outputPath = @"...";
CPDFConvertWordOptions *options = [[CPDFConvertWordOptions alloc] init] autorelease];
// Sets the OCR language, which takes effect only when IsAllowOCR is true.
[options setIsAllowOCR:YES];
//Whether to contain images when converting,which takes effect only when IsAllowOCR is false.
[options setIsContainImages:NO];
//Sets whether to contain background images, which takes effect only when IsAllowOCR is true. 
[options setIsContainOCRBgImage:NO];
//Whether to contain annotations when converting.
[options setIsContainAnnotations:NO];]
 //PDF to Word conversion parameter object (derived class of CPDFConvertOptions)Layout Options:CPDFConvertRetainPageLayout: Retain the same layout as your original file by splitting the text into multiple text boxes accoring to its layout.
[options setLayoutOptions:CPDFConvertRetainPageLayout];