summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pdf
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2019-07-29 18:56:06 +0000
committerMike Greiling <mike@pixelcog.com>2019-07-29 18:56:06 +0000
commit0a0b442f149334c970cb45387467c2ec6ea484a7 (patch)
tree0dc26505a1568ff68d45fed54531c20b49f4d498 /app/assets/javascripts/pdf
parent91c6f132eeb9af771048001aca458efad83e67c0 (diff)
parentcb3290a1a3deed5db6a5361ef3963a5eb83ef2aa (diff)
downloadgitlab-ce-0a0b442f149334c970cb45387467c2ec6ea484a7.tar.gz
Merge branch 'sh-add-cmaps-for-pdfjs' into 'master'
Make pdf.js render CJK characters Closes #62152 See merge request gitlab-org/gitlab-ce!31220
Diffstat (limited to 'app/assets/javascripts/pdf')
-rw-r--r--app/assets/javascripts/pdf/index.vue6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/assets/javascripts/pdf/index.vue b/app/assets/javascripts/pdf/index.vue
index 2b468aa5744..14640c172cd 100644
--- a/app/assets/javascripts/pdf/index.vue
+++ b/app/assets/javascripts/pdf/index.vue
@@ -34,7 +34,11 @@ export default {
load() {
this.pages = [];
return pdfjsLib
- .getDocument(this.document)
+ .getDocument({
+ url: this.document,
+ cMapUrl: '/assets/webpack/cmaps/',
+ cMapPacked: true,
+ })
.then(this.renderPages)
.then(pages => {
this.pages = pages;