Skip to content

Commit 516fa06

Browse files
committed
fix: export fucntion to set pdf worker
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 69f61e9 commit 516fa06

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
// SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
22
// SPDX-License-Identifier: AGPL-3.0-or-later
33

4+
import { GlobalWorkerOptions } from 'pdfjs-dist'
5+
import pdfWorkerCode from 'pdfjs-dist/build/pdf.worker.min.mjs'
6+
7+
GlobalWorkerOptions.workerSrc = pdfWorkerCode
8+
49
import PDFElements from './components/PDFElements.vue'
10+
export { setWorkerPath } from './utils/asyncReader.js'
511

612
PDFElements.install = function(Vue) {
713
if (PDFElements.install.installed) return

0 commit comments

Comments
 (0)