From b2ed9455c3f685fe9243f139709a444f309f2e90 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Mon, 2 Mar 2026 19:16:13 -0300 Subject: [PATCH 1/2] fix(asyncReader): use legacy worker build for browser compatibility The standard pdfjs-dist worker build uses Uint8Array.prototype.toHex natively, which requires Chrome 128+ and Firefox 132+. The legacy build includes a polyfill for this method, making it compatible with the browser targets declared in the project (Chrome 116+, Firefox ESR). Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- src/utils/asyncReader.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/asyncReader.ts b/src/utils/asyncReader.ts index a8770f4..ad11b19 100644 --- a/src/utils/asyncReader.ts +++ b/src/utils/asyncReader.ts @@ -24,7 +24,7 @@ function loadPdfjs() { function loadWorkerUrl() { if (!workerUrlPromise) { - workerUrlPromise = import('pdfjs-dist/build/pdf.worker.min.mjs?url').then( + workerUrlPromise = import('pdfjs-dist/legacy/build/pdf.worker.min.mjs?url').then( (mod) => mod.default as string ) } From efd1351bc7881bf16a72321f6c3378fc98e1a612 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Mon, 2 Mar 2026 19:16:34 -0300 Subject: [PATCH 2/2] chore: bump package version Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 723bdb3..c449b27 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@libresign/pdf-elements", "description": "PDF viewer with draggable and resizable element overlays for Vue 3", - "version": "1.1.0", + "version": "1.1.1", "author": "LibreCode ", "private": false, "main": "dist/index.js",