import { handleImageInput, ImageInput, OcrConfiguration, PdfConfiguration, withSBErrorHandling, } from '../types'; import { ScanbotSDKNativeModule } from './ScanbotSDKModule'; /** * @internal * @hidden */ export const ScanbotPdfGeneratorImpl = { async generateFromImages(params: { images: ImageInput[]; pdfConfiguration: PdfConfiguration; ocrConfiguration?: OcrConfiguration; }): Promise { return withSBErrorHandling(async () => { return await ScanbotSDKNativeModule.generatePdfFromImages({ ...params, images: handleImageInput(params.images), }); }); }, async generateFromDocument(params: { documentUuid: string; pdfConfiguration: PdfConfiguration; ocrConfiguration?: OcrConfiguration; }): Promise { return withSBErrorHandling(async () => ScanbotSDKNativeModule.generatePdfFromDocument(params)); }, };