mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
feat: upgrade pdfjs-dist from 3.x to 5.x for improved PDF viewer
Update worker path from .js to .mjs to match the new ESM-only build structure in pdfjs-dist v5. Core API (getDocument, getPage, render) remains compatible.
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@
|
|||||||
"marked": "^17.0.3",
|
"marked": "^17.0.3",
|
||||||
"marked-highlight": "^2.2.3",
|
"marked-highlight": "^2.2.3",
|
||||||
"pdf-lib": "^1.17.1",
|
"pdf-lib": "^1.17.1",
|
||||||
"pdfjs-dist": "^3.11.174",
|
"pdfjs-dist": "^5.5.207",
|
||||||
"pdfkit": "^0.14.0",
|
"pdfkit": "^0.14.0",
|
||||||
"pizzip": "^3.2.0",
|
"pizzip": "^3.2.0",
|
||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
|
|||||||
+1
-1
@@ -4182,7 +4182,7 @@ let isPdfViewerActive = false; // Track if PDF viewer is currently shown
|
|||||||
|
|
||||||
// Initialize PDF.js
|
// Initialize PDF.js
|
||||||
const pdfjsLib = require('pdfjs-dist');
|
const pdfjsLib = require('pdfjs-dist');
|
||||||
pdfjsLib.GlobalWorkerOptions.workerSrc = require.resolve('pdfjs-dist/build/pdf.worker.js');
|
pdfjsLib.GlobalWorkerOptions.workerSrc = require.resolve('pdfjs-dist/build/pdf.worker.mjs');
|
||||||
|
|
||||||
// Open PDF file
|
// Open PDF file
|
||||||
async function openPdfFile(filePath) {
|
async function openPdfFile(filePath) {
|
||||||
|
|||||||
Reference in New Issue
Block a user