react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
62 lines (52 loc) • 1.72 kB
text/typescript
import { PdfConfiguration } from '../ocr_renderer/PdfConfigurationTypes';
import { TiffGeneratorParameters } from '../tiff_wrapper/TiffTypes';
interface PdfExtractorArguments {
/**
* The location of the PDF file
*/
pdfFilePath: string;
/**
* ( iOS only )
* The quality that each extracted image should have.
* This tweaks the compression, affecting the final image file size.
* (100: maximum quality, 0: minimum quality)
*
* Default value is 90
*/
quality?: number;
/**
* ( iOS only )
* Integer scaling factor applied to the PDF media box frame while extracting.
* Affects the output image quality.
* In most cases the recommended value is 2 or higher.
*
* Default value is 2.
*/
scaling?: number;
}
export interface PerformOCRArguments {
imageFileUris: string[];
ocrConfiguration?: OCRConfiguration;
}
export interface CreatePDFArguments {
imageFileUris: string[];
pdfConfiguration: PdfConfiguration;
ocrConfiguration?: OCRConfiguration;
encryptedImageFiles?: boolean;
}
export interface WriteTIFFArguments {
imageFileUris: string[];
configuration: TiffGeneratorParameters;
}
export type OCRConfiguration = OCRScanbotEngineConfiguration | OCRTesseractConfiguration;
/** Slow but powerful OCR engine. Supports non-Latin languages. */
export type OCRTesseractConfiguration = {
engineMode: 'TESSERACT';
languages: string[];
};
/** Fast and accurate OCR engine. Supports only Latin languages. */
export type OCRScanbotEngineConfiguration = {
engineMode: 'SCANBOT_OCR';
};
export interface ExtractImagesFromPdfArguments extends PdfExtractorArguments {}
export interface ExtractPagesFromPdfArguments extends PdfExtractorArguments {}