On this page
Guides
Convert PDF to searchable PDF
Overview
To make a searchable PDF by adding invisible text to an image based PDF such as a scanned document using OCR.
Sample
Full code sample which shows how to use the ComPDFKit OCR module on scanned documents in multiple languages.
objective-c
// Get the path of the PDF file.
NSString *pdfPath = @"...";
// Get the path of the PDF file.
NSString *outputPath = @"...";
CPDFConvertSearchablePDFOptions * options = [[CPDFConvertSearchablePDFOptions alloc] init];
[options setLanguage:COCRLanguageEnglish];
CPDFConverterSearchablePDF *converter = [[CPDFConverterSearchablePDF alloc] initWithURL:[NSURL fileURLWithPath:pdfPath] password:nil];
[converter convertToFilePath:outputPath pageIndexs:nil options:options];