mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Move the cMapUrl
and cMapPacked
options from the global PDFJS
object and into getDocument
instead
This commit is contained in:
parent
b674409397
commit
3c2fbdffe6
13 changed files with 72 additions and 63 deletions
|
@ -24,8 +24,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.PDFViewer || !PDFJS.getDocument) {
|
|||
var USE_ONLY_CSS_ZOOM = true;
|
||||
var TEXT_LAYER_MODE = 0; // DISABLE
|
||||
var MAX_IMAGE_SIZE = 1024 * 1024;
|
||||
PDFJS.cMapUrl = '../../node_modules/pdfjs-dist/cmaps/';
|
||||
PDFJS.cMapPacked = true;
|
||||
var CMAP_URL = '../../node_modules/pdfjs-dist/cmaps/';
|
||||
var CMAP_PACKED = true;
|
||||
|
||||
PDFJS.GlobalWorkerOptions.workerSrc =
|
||||
'../../node_modules/pdfjs-dist/build/pdf.worker.js';
|
||||
|
@ -65,6 +65,8 @@ var PDFViewerApplication = {
|
|||
var loadingTask = PDFJS.getDocument({
|
||||
url: url,
|
||||
maxImageSize: MAX_IMAGE_SIZE,
|
||||
cMapUrl: CMAP_URL,
|
||||
cMapPacked: CMAP_PACKED,
|
||||
});
|
||||
this.pdfLoadingTask = loadingTask;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue