fix(core): update
This commit is contained in:
@@ -232,7 +232,7 @@ export class SmartPdf {
|
||||
height?: number;
|
||||
quality?: number;
|
||||
} = {}
|
||||
): Promise<Uint8Array[]> {
|
||||
) {
|
||||
const { width = 1024, height = 768, quality = 100 } = options;
|
||||
|
||||
// Load the PDF document
|
||||
@@ -257,6 +257,8 @@ export class SmartPdf {
|
||||
}
|
||||
|
||||
// Resolve all promises and return the array of buffers
|
||||
return Promise.all(imagePromises);
|
||||
const imageBuffers = await Promise.all(imagePromises);
|
||||
const imageUint8Arrays = imageBuffers.map((buffer) => new Uint8Array(buffer));
|
||||
return imageUint8Arrays;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user