perform Ocr On Pages
open fun performOcrOnPages(@NonNull pageIndexes: Set<Integer>, @NonNull ocrLanguage: OcrLanguage): PdfProcessorTask
Performs optical character recognition on the provided set of pages in the PDF document.
In order to use this feature, you need to include the PSPDFKit OCR dependencies in your framework. If using Gradle, you can add to your build.gradle
file:
final String pspdfkit_version = {@value Nutrient#VERSION};
dependencies {
// Add the OCR component to your app.
implementation "com.pspdfkit:pspdfkit-ocr:$pspdfkit_version"
// Add one or multiple language packs for OCR.
implementation "com.pspdfkit:pspdfkit-ocr-english:$pspdfkit_version"
}
Content copied to clipboard
NOTE: In order to use this, your license requires to have the OCR component enabled. Also, the language you pass in as a parameter needs to have a respective OCR language pack added to the dependencies. See OcrLanguage for a list of available languages.
For additional guidance on how to integrate and use OCR inside your app, please visit ....
Return
This processor task for configuring processing steps.
Parameters
page Indexes
Pages that should be used in OCR processing.
ocr Language
OcrLanguage for OCR processing.