File tree Expand file tree Collapse file tree
frontend/src/components/print Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,20 +120,13 @@ async function renderPdf() {
120120 pdfDoc = null
121121 }
122122
123- // 关键参数说明:
124- // - cMapUrl / cMapPacked:支持 UniGB-UCS2-H 等中文外部 CMap,修复 CJK 预览空白
125- // - standardFontDataUrl:提供标准 14 字体数据(Helvetica/Courier/Times 等)
126- // - disableFontFace=false:允许用 @font-face 注入字体(默认就是 false,显式保留以防升级回归)
127- // - useSystemFonts=false:优先使用 PDF 中嵌入的字体而非系统字体,
128- // 配合后端 normalizePDF(gs pdfwrite 嵌入 TrueType 子集),确保预览与打印字形一致
129- // - isEvalSupported=false:CSP/严格 Worker 环境下避免 eval 被拦截
130123 const doc = await pdfjsLib .getDocument ({
131124 url: props .src ,
132125 cMapUrl: ' /pdfjs/cmaps/' ,
133126 cMapPacked: true ,
134127 standardFontDataUrl: ' /pdfjs/standard_fonts/' ,
135128 disableFontFace: false ,
136- useSystemFonts: false ,
129+ useSystemFonts: true ,
137130 isEvalSupported: false
138131 }).promise
139132
You can’t perform that action at this time.
0 commit comments