update dependencies, improve PDF handling, and enhance printer integration
This commit is contained in:
15
src/connectors/PdfToBitmap.ts
Normal file
15
src/connectors/PdfToBitmap.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import {NativeModules} from 'react-native';
|
||||
|
||||
interface PdfToBitmapInterface {
|
||||
convertPdfToBitmaps(pdfBase64: string): Promise<string[]>;
|
||||
}
|
||||
|
||||
const { PdfToBitmap } = NativeModules as { PdfToBitmap: PdfToBitmapInterface };
|
||||
|
||||
export async function convertPdfToBitmaps(pdfBase64: string): Promise<string[]> {
|
||||
try {
|
||||
return await PdfToBitmap.convertPdfToBitmaps(pdfBase64);
|
||||
} catch (error) {
|
||||
throw new Error(`Failed to convert PDF to bitmaps: ${error}`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user