capacitor-plugin-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK for Capacitor
52 lines (51 loc) • 1.73 kB
TypeScript
import type { PdfConfiguration } from '../ocr_renderer/PdfConfigurationTypes';
import type { TiffGeneratorParameters } from '../tiff_wrapper/TiffTypes';
interface PdfExtractorArguments {
/**
* The location of the PDF file
*/
pdfFilePath: string;
/**
* 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;
/**
* 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 type ExtractImagesFromPdfArguments = PdfExtractorArguments;
export type ExtractPagesFromPdfArguments = PdfExtractorArguments;
export {};