fix(core): update
This commit is contained in:
@@ -225,7 +225,7 @@ export class SmartPdf {
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
public async convertPDFToJPGBytes(
|
||||
public async convertPDFToPngBytes(
|
||||
pdfBytes: Uint8Array,
|
||||
options: {
|
||||
width?: number;
|
||||
@@ -240,7 +240,7 @@ export class SmartPdf {
|
||||
|
||||
const converter = plugins.pdf2pic.fromBuffer(Buffer.from(pdfBytes), {
|
||||
density: 100, // Image density (DPI)
|
||||
format: 'jpg', // Image format
|
||||
format: 'png', // Image format
|
||||
width, // Output image width
|
||||
height, // Output image height
|
||||
quality, // Output image quality
|
||||
@@ -258,7 +258,7 @@ export class SmartPdf {
|
||||
|
||||
// Resolve all promises and return the array of buffers
|
||||
const imageBuffers = await Promise.all(imagePromises);
|
||||
const imageUint8Arrays = imageBuffers.map((buffer) => new Uint8Array(buffer));
|
||||
const imageUint8Arrays = imageBuffers.map((buffer) => buffer);
|
||||
return imageUint8Arrays;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user