From 3409674e669cbbe509d327cd6fb28e209027e267 Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Sat, 28 Sep 2024 19:17:12 +0800 Subject: [PATCH] PDF: set `isEvalSupported` to `false` `eval()` would be blocked by CSP and thus not supported --- pdf.js | 1 + 1 file changed, 1 insertion(+) diff --git a/pdf.js b/pdf.js index eba1c77..a686ab4 100644 --- a/pdf.js +++ b/pdf.js @@ -110,6 +110,7 @@ export const makePDF = async file => { data, cMapUrl: pdfjsPath('cmaps/'), standardFontDataUrl: pdfjsPath('standard_fonts/'), + isEvalSupported: false, }).promise const book = { rendition: { layout: 'pre-paginated' } }