Compare commits

...

2 Commits

Author SHA1 Message Date
addff418c6 3.1.4 2024-04-26 13:39:58 +02:00
14d653e701 fix(core): update 2024-04-26 13:39:57 +02:00
3 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@push.rocks/smartpdf",
"version": "3.1.3",
"version": "3.1.4",
"private": false,
"description": "A library for creating PDFs dynamically from HTML or websites with additional features like merging PDFs.",
"main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartpdf',
version: '3.1.3',
version: '3.1.4',
description: 'A library for creating PDFs dynamically from HTML or websites with additional features like merging PDFs.'
}

View File

@ -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;
}
}