Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_pdfviewer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2019-06-21 15:02:46 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-06-21 15:37:15 +0300
commita7a8d83eb0ab5d8a272232c4c89cc18e45065df6 (patch)
treed70b62bda103d72c79449a89e65e2115f2731af7 /templates
parent346af098cd053d82f737e43a3876b3ee0a7b0e28 (diff)
Fix load of character maps
The character maps are used by PDF.JS for font rendering, and are needed to properly show some texts (for example, Japanese text). The PDF.JS package provides the needed character maps, but the URL to get them must be set with the "PDFJS.cMapUrl" property in the same way as the "PDFJs.workerSrc" property is set (as the default value set in "viewer.js" is not right for the PDF viewer app). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/viewer.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/viewer.php b/templates/viewer.php
index 12b0cbe..7f06763 100644
--- a/templates/viewer.php
+++ b/templates/viewer.php
@@ -27,7 +27,8 @@ Adobe CMap resources are covered by their own copyright but the same license:
See https://github.com/adobe-type-tools/cmap-resources
-->
<html dir="ltr" mozdisallowselectionprint moznomarginboxes>
- <head data-workersrc="<?php p($urlGenerator->linkTo('files_pdfviewer', 'vendor/pdfjs/build/pdf.worker.js')) ?>?v=<?php p($version) ?>">
+ <head data-workersrc="<?php p($urlGenerator->linkTo('files_pdfviewer', 'vendor/pdfjs/build/pdf.worker.js')) ?>?v=<?php p($version) ?>"
+ data-cmapurl="<?php p($urlGenerator->linkTo('files_pdfviewer', 'vendor/pdfjs/web/cmaps/')) ?>">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="google" content="notranslate">