Compare commits

..

6 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
040bac5256 3.1.3 2024-04-26 13:29:32 +02:00
bf44901a0a fix(core): update 2024-04-26 13:29:32 +02:00
b4d0f4e949 3.1.2 2024-04-26 13:28:07 +02:00
b2b47b1f6a fix(core): update 2024-04-26 13:28:07 +02:00
5 changed files with 776 additions and 798 deletions

View File

@ -119,6 +119,6 @@ jobs:
run: |
npmci node install stable
npmci npm install
pnpm install -g @gitzone/tsdoc
pnpm install -g @git.zone/tsdoc
npmci command tsdoc
continue-on-error: true

View File

@ -1,6 +1,6 @@
{
"name": "@push.rocks/smartpdf",
"version": "3.1.1",
"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",
@ -14,10 +14,10 @@
"buildDocs": "tsdoc"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.66",
"@gitzone/tsdoc": "^1.1.12",
"@gitzone/tsrun": "^1.2.44",
"@gitzone/tstest": "^1.0.77",
"@git.zone/tsbuild": "^2.1.66",
"@git.zone/tsdoc": "^1.1.12",
"@git.zone/tsrun": "^1.2.44",
"@git.zone/tstest": "^1.0.77",
"@push.rocks/tapbundle": "^5.0.23",
"@types/node": "^20.12.7"
},

1554
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartpdf',
version: '3.1.1',
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;
}
}