Skip to content
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.

kotlin
val inputFilePath = "***";
val password = "***";
val outputFileName = "***";

val pdfOptions = PdfOptions();
pdfOptions.enableOcr = true;
val error = ComPDFKitConverter.startPDFToSearchablePDF(inputFilePath, password, outputFileName, pdfOptions);