From ec2f349465fd00af031fc9b9c3bbefeaf2b975b7 Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Thu, 5 Jan 2023 09:52:40 +0100 Subject: [PATCH] [#7902] Fix to enable cmaps with pdfjs (#8101) pdfjs works fine with Japanese characters with this options. Co-authored-by: Hiroshi Shirosaki --- lib/core/src/lib/viewer/components/pdf-viewer.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/src/lib/viewer/components/pdf-viewer.component.ts b/lib/core/src/lib/viewer/components/pdf-viewer.component.ts index f7871f3b3d..6d264a6b8f 100644 --- a/lib/core/src/lib/viewer/components/pdf-viewer.component.ts +++ b/lib/core/src/lib/viewer/components/pdf-viewer.component.ts @@ -109,7 +109,9 @@ export class PdfViewerComponent implements OnChanges, OnDestroy { private eventBus = new pdfjsViewer.EventBus(); private pdfjsDefaultOptions = { disableAutoFetch: true, - disableStream: true + disableStream: true, + cMapUrl: './cmaps/', + cMapPacked: true }; private pdfjsWorkerDestroy$ = new Subject(); private onDestroy$ = new Subject();