mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-03 23:00:31 +00:00
Fix: ship pdf.js CMaps so CJK documents render in the viewer (#14318)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
co-authored by
Claude Opus 5
shamoon
parent
da3de299fc
commit
9d50a3b261
@@ -91,6 +91,11 @@
|
||||
"glob": "**/*",
|
||||
"input": "node_modules/pdfjs-dist/iccs/",
|
||||
"output": "/assets/iccs/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "node_modules/pdfjs-dist/cmaps/",
|
||||
"output": "/assets/cmaps/"
|
||||
}
|
||||
],
|
||||
"styles": [
|
||||
|
||||
@@ -90,6 +90,7 @@ describe('PngxPdfViewerComponent', () => {
|
||||
withCredentials: true,
|
||||
wasmUrl: expect.stringContaining('/paperless/assets/wasm/'),
|
||||
iccUrl: expect.stringContaining('/paperless/assets/iccs/'),
|
||||
cMapUrl: expect.stringContaining('/paperless/assets/cmaps/'),
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -190,6 +190,7 @@ export class PngxPdfViewerComponent
|
||||
withCredentials: true,
|
||||
wasmUrl: new URL('assets/wasm/', this.document.baseURI).toString(),
|
||||
iccUrl: new URL('assets/iccs/', this.document.baseURI).toString(),
|
||||
cMapUrl: new URL('assets/cmaps/', this.document.baseURI).toString(),
|
||||
}
|
||||
this.loadingTask = getDocument(initOptions)
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user