fix: add cmaps (#2588)

This commit is contained in:
Lucas Smith 2026-03-09 14:07:13 +11:00 committed by GitHub
parent f82bf97480
commit cc71c7d9ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -113,7 +113,8 @@ export default function PDFViewer({
return;
}
const loadedPdf = await pdfjsLib.getDocument({ data: result! }).promise;
const loadedPdf = await pdfjsLib.getDocument({ data: result!, cMapUrl: '/static/cmaps/' })
.promise;
if (isCancelled) {
await loadedPdf.destroy();