[Pkg-javascript-commits] [pdf.js] 238/414: [SVG] Specify the `PDFJS.cMapUrl`/`PDFJS.cMapPacked` parameters in the svgviewer example
David Prévot
taffit at moszumanska.debian.org
Tue Jun 28 17:12:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 4a6575643bbbc8c554a13e1debde53e2484130fa
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Fri Feb 26 22:47:00 2016 +0100
[SVG] Specify the `PDFJS.cMapUrl`/`PDFJS.cMapPacked` parameters in the svgviewer example
Re: issue 7017.
This should prevent the error, but does not fix the broken rendering.
The rendering issues are caused by `svg.js` not supporting the various text rendering modes, in this case specifically "invisible" (as indicated in the console `Warning: Unimplemented method setTextRenderingMode`).
Compared to the canvas case, where we just ignore invisible text, a smarter solution is probably required for the SVG case. Since just ignoring invisible text in `svg.js` would mean that text-selection isn't possible.
---
examples/svgviewer/viewer.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/examples/svgviewer/viewer.js b/examples/svgviewer/viewer.js
index a9ae5c8..3fe24d9 100644
--- a/examples/svgviewer/viewer.js
+++ b/examples/svgviewer/viewer.js
@@ -53,6 +53,10 @@ require(['pdfjs/display/api', 'pdfjs/display/svg'], function (api, svg) {
// In production, change this to point to the built `pdf.worker.js` file.
PDFJS.workerSrc = '../../src/worker_loader.js';
+ // In production, change this to point to where the cMaps are placed.
+ PDFJS.cMapUrl = '../../external/bcmaps/';
+ PDFJS.cMapPacked = true;
+
// Fetch the PDF document from the URL using promises.
api.getDocument(url).then(renderDocument);
});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list