Move the cMapUrl
and cMapPacked
options from the global PDFJS
object and into getDocument
instead
This commit is contained in:
parent
b674409397
commit
3c2fbdffe6
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
if (!PDFJS.PDFViewer || !PDFJS.getDocument) {
|
if (!PDFJS.PDFPageView || !PDFJS.getDocument) {
|
||||||
alert('Please build the pdfjs-dist library using\n' +
|
alert('Please build the pdfjs-dist library using\n' +
|
||||||
' `gulp dist-install`');
|
' `gulp dist-install`');
|
||||||
}
|
}
|
||||||
@ -27,8 +27,8 @@ PDFJS.GlobalWorkerOptions.workerSrc =
|
|||||||
|
|
||||||
// Some PDFs need external cmaps.
|
// Some PDFs need external cmaps.
|
||||||
//
|
//
|
||||||
// PDFJS.cMapUrl = '../../node_modules/pdfjs-dist/cmaps/';
|
var CMAP_URL = '../../node_modules/pdfjs-dist/cmaps/';
|
||||||
// PDFJS.cMapPacked = true;
|
var CMAP_PACKED = true;
|
||||||
|
|
||||||
var DEFAULT_URL = '../../web/compressed.tracemonkey-pldi-09.pdf';
|
var DEFAULT_URL = '../../web/compressed.tracemonkey-pldi-09.pdf';
|
||||||
var PAGE_TO_VIEW = 1;
|
var PAGE_TO_VIEW = 1;
|
||||||
@ -37,7 +37,11 @@ var SCALE = 1.0;
|
|||||||
var container = document.getElementById('pageContainer');
|
var container = document.getElementById('pageContainer');
|
||||||
|
|
||||||
// Loading document.
|
// Loading document.
|
||||||
PDFJS.getDocument(DEFAULT_URL).then(function (pdfDocument) {
|
PDFJS.getDocument({
|
||||||
|
url: DEFAULT_URL,
|
||||||
|
cMapUrl: CMAP_URL,
|
||||||
|
cMapPacked: CMAP_PACKED,
|
||||||
|
}).then(function(pdfDocument) {
|
||||||
// Document loaded, retrieving the page.
|
// Document loaded, retrieving the page.
|
||||||
return pdfDocument.getPage(PAGE_TO_VIEW).then(function (pdfPage) {
|
return pdfDocument.getPage(PAGE_TO_VIEW).then(function (pdfPage) {
|
||||||
// Creating the page view with default parameters.
|
// Creating the page view with default parameters.
|
||||||
|
@ -27,8 +27,8 @@ PDFJS.GlobalWorkerOptions.workerSrc =
|
|||||||
|
|
||||||
// Some PDFs need external cmaps.
|
// Some PDFs need external cmaps.
|
||||||
//
|
//
|
||||||
// PDFJS.cMapUrl = '../../node_modules/pdfjs-dist/cmaps/';
|
var CMAP_URL = '../../node_modules/pdfjs-dist/cmaps/';
|
||||||
// PDFJS.cMapPacked = true;
|
var CMAP_PACKED = true;
|
||||||
|
|
||||||
var DEFAULT_URL = '../../web/compressed.tracemonkey-pldi-09.pdf';
|
var DEFAULT_URL = '../../web/compressed.tracemonkey-pldi-09.pdf';
|
||||||
var SEARCH_FOR = ''; // try 'Mozilla';
|
var SEARCH_FOR = ''; // try 'Mozilla';
|
||||||
@ -60,7 +60,11 @@ container.addEventListener('pagesinit', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Loading document.
|
// Loading document.
|
||||||
PDFJS.getDocument(DEFAULT_URL).then(function (pdfDocument) {
|
PDFJS.getDocument({
|
||||||
|
url: DEFAULT_URL,
|
||||||
|
cMapUrl: CMAP_URL,
|
||||||
|
cMapPacked: CMAP_PACKED,
|
||||||
|
}).then(function(pdfDocument) {
|
||||||
// Document loaded, specifying document for the viewer and
|
// Document loaded, specifying document for the viewer and
|
||||||
// the (optional) linkService.
|
// the (optional) linkService.
|
||||||
pdfViewer.setDocument(pdfDocument);
|
pdfViewer.setDocument(pdfDocument);
|
||||||
|
@ -27,8 +27,8 @@ PDFJS.GlobalWorkerOptions.workerSrc =
|
|||||||
|
|
||||||
// Some PDFs need external cmaps.
|
// Some PDFs need external cmaps.
|
||||||
//
|
//
|
||||||
// PDFJS.cMapUrl = '../../node_modules/pdfjs-dist/cmaps/';
|
var CMAP_URL = '../../node_modules/pdfjs-dist/cmaps/';
|
||||||
// PDFJS.cMapPacked = true;
|
var CMAP_PACKED = true;
|
||||||
|
|
||||||
var DEFAULT_URL = '../../web/compressed.tracemonkey-pldi-09.pdf';
|
var DEFAULT_URL = '../../web/compressed.tracemonkey-pldi-09.pdf';
|
||||||
var SEARCH_FOR = ''; // try 'Mozilla';
|
var SEARCH_FOR = ''; // try 'Mozilla';
|
||||||
@ -60,7 +60,11 @@ container.addEventListener('pagesinit', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Loading document.
|
// Loading document.
|
||||||
PDFJS.getDocument(DEFAULT_URL).then(function (pdfDocument) {
|
PDFJS.getDocument({
|
||||||
|
url: DEFAULT_URL,
|
||||||
|
cMapUrl: CMAP_URL,
|
||||||
|
cMapPacked: CMAP_PACKED,
|
||||||
|
}).then(function(pdfDocument) {
|
||||||
// Document loaded, specifying document for the viewer and
|
// Document loaded, specifying document for the viewer and
|
||||||
// the (optional) linkService.
|
// the (optional) linkService.
|
||||||
pdfSinglePageViewer.setDocument(pdfDocument);
|
pdfSinglePageViewer.setDocument(pdfDocument);
|
||||||
|
@ -24,8 +24,8 @@ if (typeof PDFJS === 'undefined' || !PDFJS.PDFViewer || !PDFJS.getDocument) {
|
|||||||
var USE_ONLY_CSS_ZOOM = true;
|
var USE_ONLY_CSS_ZOOM = true;
|
||||||
var TEXT_LAYER_MODE = 0; // DISABLE
|
var TEXT_LAYER_MODE = 0; // DISABLE
|
||||||
var MAX_IMAGE_SIZE = 1024 * 1024;
|
var MAX_IMAGE_SIZE = 1024 * 1024;
|
||||||
PDFJS.cMapUrl = '../../node_modules/pdfjs-dist/cmaps/';
|
var CMAP_URL = '../../node_modules/pdfjs-dist/cmaps/';
|
||||||
PDFJS.cMapPacked = true;
|
var CMAP_PACKED = true;
|
||||||
|
|
||||||
PDFJS.GlobalWorkerOptions.workerSrc =
|
PDFJS.GlobalWorkerOptions.workerSrc =
|
||||||
'../../node_modules/pdfjs-dist/build/pdf.worker.js';
|
'../../node_modules/pdfjs-dist/build/pdf.worker.js';
|
||||||
@ -65,6 +65,8 @@ var PDFViewerApplication = {
|
|||||||
var loadingTask = PDFJS.getDocument({
|
var loadingTask = PDFJS.getDocument({
|
||||||
url: url,
|
url: url,
|
||||||
maxImageSize: MAX_IMAGE_SIZE,
|
maxImageSize: MAX_IMAGE_SIZE,
|
||||||
|
cMapUrl: CMAP_URL,
|
||||||
|
cMapPacked: CMAP_PACKED,
|
||||||
});
|
});
|
||||||
this.pdfLoadingTask = loadingTask;
|
this.pdfLoadingTask = loadingTask;
|
||||||
|
|
||||||
|
@ -38,29 +38,31 @@ function renderDocument(pdf, svgLib) {
|
|||||||
|
|
||||||
Promise.all([System.import('pdfjs/display/api'),
|
Promise.all([System.import('pdfjs/display/api'),
|
||||||
System.import('pdfjs/display/svg'),
|
System.import('pdfjs/display/svg'),
|
||||||
System.import('pdfjs/display/global'),
|
|
||||||
System.import('pdfjs/display/worker_options'),
|
System.import('pdfjs/display/worker_options'),
|
||||||
System.import('pdfjs/display/network'),
|
System.import('pdfjs/display/network'),
|
||||||
System.resolve('pdfjs/worker_loader')])
|
System.resolve('pdfjs/worker_loader')])
|
||||||
.then(function (modules) {
|
.then(function (modules) {
|
||||||
var api = modules[0];
|
var api = modules[0];
|
||||||
var svg = modules[1];
|
var svg = modules[1];
|
||||||
var global = modules[2];
|
var GlobalWorkerOptions = modules[2].GlobalWorkerOptions;
|
||||||
var GlobalWorkerOptions = modules[3].GlobalWorkerOptions;
|
var network = modules[3];
|
||||||
var network = modules[4];
|
|
||||||
api.setPDFNetworkStreamFactory((params) => {
|
api.setPDFNetworkStreamFactory((params) => {
|
||||||
return new network.PDFNetworkStream(params);
|
return new network.PDFNetworkStream(params);
|
||||||
});
|
});
|
||||||
|
|
||||||
// In production, change this to point to the built `pdf.worker.js` file.
|
// In production, change this to point to the built `pdf.worker.js` file.
|
||||||
GlobalWorkerOptions.workerSrc = modules[5];
|
GlobalWorkerOptions.workerSrc = modules[4];
|
||||||
|
|
||||||
// In production, change this to point to where the cMaps are placed.
|
// In production, change this to point to where the cMaps are placed.
|
||||||
global.PDFJS.cMapUrl = '../../external/bcmaps/';
|
var CMAP_URL = '../../external/bcmaps/';
|
||||||
global.PDFJS.cMapPacked = true;
|
var CMAP_PACKED = true;
|
||||||
|
|
||||||
// Fetch the PDF document from the URL using promises.
|
// Fetch the PDF document from the URL using promises.
|
||||||
api.getDocument(url).then(function (doc) {
|
api.getDocument({
|
||||||
|
url: url,
|
||||||
|
cMapUrl: CMAP_URL,
|
||||||
|
cMapPacked: CMAP_PACKED,
|
||||||
|
}).then(function(doc) {
|
||||||
renderDocument(doc, svg);
|
renderDocument(doc, svg);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -142,6 +142,10 @@ function setPDFNetworkStreamFactory(pdfNetworkStreamFactory) {
|
|||||||
* with limited image support through stubs (useful for SVG conversion),
|
* with limited image support through stubs (useful for SVG conversion),
|
||||||
* and 'none' where JPEG images will be decoded entirely by PDF.js.
|
* and 'none' where JPEG images will be decoded entirely by PDF.js.
|
||||||
* The default value is 'decode'.
|
* The default value is 'decode'.
|
||||||
|
* @property {string} cMapUrl - (optional) The URL where the predefined
|
||||||
|
* Adobe CMaps are located. Include trailing slash.
|
||||||
|
* @property {boolean} cMapPacked - (optional) Specifies if the Adobe CMaps are
|
||||||
|
* binary packed.
|
||||||
* @property {Object} CMapReaderFactory - (optional) The factory that will be
|
* @property {Object} CMapReaderFactory - (optional) The factory that will be
|
||||||
* used when reading built-in CMap files. Providing a custom factory is useful
|
* used when reading built-in CMap files. Providing a custom factory is useful
|
||||||
* for environments without `XMLHttpRequest` support, such as e.g. Node.js.
|
* for environments without `XMLHttpRequest` support, such as e.g. Node.js.
|
||||||
@ -201,7 +205,7 @@ function getDocument(src) {
|
|||||||
let params = Object.create(null);
|
let params = Object.create(null);
|
||||||
var rangeTransport = null;
|
var rangeTransport = null;
|
||||||
let worker = null;
|
let worker = null;
|
||||||
var CMapReaderFactory = DOMCMapReaderFactory;
|
let CMapReaderFactory = DOMCMapReaderFactory;
|
||||||
|
|
||||||
for (var key in source) {
|
for (var key in source) {
|
||||||
if (key === 'url' && typeof window !== 'undefined') {
|
if (key === 'url' && typeof window !== 'undefined') {
|
||||||
@ -289,7 +293,7 @@ function getDocument(src) {
|
|||||||
var messageHandler = new MessageHandler(docId, workerId, worker.port);
|
var messageHandler = new MessageHandler(docId, workerId, worker.port);
|
||||||
messageHandler.postMessageTransfers = worker.postMessageTransfers;
|
messageHandler.postMessageTransfers = worker.postMessageTransfers;
|
||||||
var transport = new WorkerTransport(messageHandler, task, networkStream,
|
var transport = new WorkerTransport(messageHandler, task, networkStream,
|
||||||
CMapReaderFactory);
|
params, CMapReaderFactory);
|
||||||
task._transport = transport;
|
task._transport = transport;
|
||||||
messageHandler.send('Ready', null);
|
messageHandler.send('Ready', null);
|
||||||
});
|
});
|
||||||
@ -1550,14 +1554,15 @@ var PDFWorker = (function PDFWorkerClosure() {
|
|||||||
*/
|
*/
|
||||||
var WorkerTransport = (function WorkerTransportClosure() {
|
var WorkerTransport = (function WorkerTransportClosure() {
|
||||||
function WorkerTransport(messageHandler, loadingTask, networkStream,
|
function WorkerTransport(messageHandler, loadingTask, networkStream,
|
||||||
CMapReaderFactory) {
|
params, CMapReaderFactory) {
|
||||||
this.messageHandler = messageHandler;
|
this.messageHandler = messageHandler;
|
||||||
this.loadingTask = loadingTask;
|
this.loadingTask = loadingTask;
|
||||||
this.commonObjs = new PDFObjects();
|
this.commonObjs = new PDFObjects();
|
||||||
this.fontLoader = new FontLoader(loadingTask.docId);
|
this.fontLoader = new FontLoader(loadingTask.docId);
|
||||||
|
this._params = params;
|
||||||
this.CMapReaderFactory = new CMapReaderFactory({
|
this.CMapReaderFactory = new CMapReaderFactory({
|
||||||
baseUrl: getDefaultSetting('cMapUrl'),
|
baseUrl: params.cMapUrl,
|
||||||
isCompressed: getDefaultSetting('cMapPacked'),
|
isCompressed: params.cMapPacked,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.destroyed = false;
|
this.destroyed = false;
|
||||||
|
@ -69,8 +69,9 @@ class DOMCMapReaderFactory {
|
|||||||
|
|
||||||
fetch({ name, }) {
|
fetch({ name, }) {
|
||||||
if (!this.baseUrl) {
|
if (!this.baseUrl) {
|
||||||
return Promise.reject(new Error('CMap baseUrl must be specified, ' +
|
return Promise.reject(new Error(
|
||||||
'see "PDFJS.cMapUrl" (and also "PDFJS.cMapPacked").'));
|
'The CMap "baseUrl" parameter must be specified, ensure that ' +
|
||||||
|
'the "cMapUrl" and "cMapPacked" API parameters are provided.'));
|
||||||
}
|
}
|
||||||
if (!name) {
|
if (!name) {
|
||||||
return Promise.reject(new Error('CMap name must be specified.'));
|
return Promise.reject(new Error('CMap name must be specified.'));
|
||||||
@ -345,10 +346,6 @@ function getDefaultSetting(id) {
|
|||||||
return globalSettings ? globalSettings.disableFontFace : false;
|
return globalSettings ? globalSettings.disableFontFace : false;
|
||||||
case 'disableCreateObjectURL':
|
case 'disableCreateObjectURL':
|
||||||
return globalSettings ? globalSettings.disableCreateObjectURL : false;
|
return globalSettings ? globalSettings.disableCreateObjectURL : false;
|
||||||
case 'cMapUrl':
|
|
||||||
return globalSettings ? globalSettings.cMapUrl : null;
|
|
||||||
case 'cMapPacked':
|
|
||||||
return globalSettings ? globalSettings.cMapPacked : false;
|
|
||||||
case 'isEvalSupported':
|
case 'isEvalSupported':
|
||||||
return globalSettings ? globalSettings.isEvalSupported : true;
|
return globalSettings ? globalSettings.isEvalSupported : true;
|
||||||
default:
|
default:
|
||||||
|
@ -65,19 +65,6 @@ PDFJS.Util = Util;
|
|||||||
PDFJS.PageViewport = PageViewport;
|
PDFJS.PageViewport = PageViewport;
|
||||||
PDFJS.createPromiseCapability = createPromiseCapability;
|
PDFJS.createPromiseCapability = createPromiseCapability;
|
||||||
|
|
||||||
/**
|
|
||||||
* The url of where the predefined Adobe CMaps are located. Include trailing
|
|
||||||
* slash.
|
|
||||||
* @var {string}
|
|
||||||
*/
|
|
||||||
PDFJS.cMapUrl = (PDFJS.cMapUrl === undefined ? null : PDFJS.cMapUrl);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Specifies if CMaps are binary packed.
|
|
||||||
* @var {boolean}
|
|
||||||
*/
|
|
||||||
PDFJS.cMapPacked = PDFJS.cMapPacked === undefined ? false : PDFJS.cMapPacked;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* By default fonts are converted to OpenType fonts and loaded via font face
|
* By default fonts are converted to OpenType fonts and loaded via font face
|
||||||
* rules. If disabled, the font will be rendered using a built in font
|
* rules. If disabled, the font will be rendered using a built in font
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
const WAITING_TIME = 100; // ms
|
const WAITING_TIME = 100; // ms
|
||||||
const PDF_TO_CSS_UNITS = 96.0 / 72.0;
|
const PDF_TO_CSS_UNITS = 96.0 / 72.0;
|
||||||
|
const CMAP_URL = '../external/bcmaps/';
|
||||||
|
const CMAP_PACKED = true;
|
||||||
const IMAGE_RESOURCES_PATH = '/web/images/';
|
const IMAGE_RESOURCES_PATH = '/web/images/';
|
||||||
const WORKER_SRC = '../build/generic/build/pdf.worker.js';
|
const WORKER_SRC = '../build/generic/build/pdf.worker.js';
|
||||||
|
|
||||||
@ -271,8 +273,6 @@ var Driver = (function DriverClosure() { // eslint-disable-line no-unused-vars
|
|||||||
// Configure the global worker options.
|
// Configure the global worker options.
|
||||||
PDFJS.GlobalWorkerOptions.workerSrc = WORKER_SRC;
|
PDFJS.GlobalWorkerOptions.workerSrc = WORKER_SRC;
|
||||||
|
|
||||||
PDFJS.cMapPacked = true;
|
|
||||||
PDFJS.cMapUrl = '../external/bcmaps/';
|
|
||||||
PDFJS.pdfBug = true;
|
PDFJS.pdfBug = true;
|
||||||
|
|
||||||
// Set the passed options
|
// Set the passed options
|
||||||
@ -366,6 +366,8 @@ var Driver = (function DriverClosure() { // eslint-disable-line no-unused-vars
|
|||||||
url: absoluteUrl,
|
url: absoluteUrl,
|
||||||
password: task.password,
|
password: task.password,
|
||||||
nativeImageDecoderSupport: task.nativeImageDecoderSupport,
|
nativeImageDecoderSupport: task.nativeImageDecoderSupport,
|
||||||
|
cMapUrl: CMAP_URL,
|
||||||
|
cMapPacked: CMAP_PACKED,
|
||||||
}).then((doc) => {
|
}).then((doc) => {
|
||||||
task.pdfDoc = doc;
|
task.pdfDoc = doc;
|
||||||
this._nextPage(task, failure);
|
this._nextPage(task, failure);
|
||||||
|
@ -281,8 +281,9 @@ describe('cmap', function() {
|
|||||||
done.fail('No CMap should be loaded');
|
done.fail('No CMap should be loaded');
|
||||||
}, function (reason) {
|
}, function (reason) {
|
||||||
expect(reason instanceof Error).toEqual(true);
|
expect(reason instanceof Error).toEqual(true);
|
||||||
expect(reason.message).toEqual('CMap baseUrl must be specified, ' +
|
expect(reason.message).toEqual(
|
||||||
'see "PDFJS.cMapUrl" (and also "PDFJS.cMapPacked").');
|
'The CMap "baseUrl" parameter must be specified, ensure that ' +
|
||||||
|
'the "cMapUrl" and "cMapPacked" API parameters are provided.');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -51,8 +51,9 @@ class NodeCMapReaderFactory {
|
|||||||
|
|
||||||
fetch({ name, }) {
|
fetch({ name, }) {
|
||||||
if (!this.baseUrl) {
|
if (!this.baseUrl) {
|
||||||
return Promise.reject(new Error('CMap baseUrl must be specified, ' +
|
return Promise.reject(new Error(
|
||||||
'see "PDFJS.cMapUrl" (and also "PDFJS.cMapPacked").'));
|
'The CMap "baseUrl" parameter must be specified, ensure that ' +
|
||||||
|
'the "cMapUrl" and "cMapPacked" API parameters are provided.'));
|
||||||
}
|
}
|
||||||
if (!name) {
|
if (!name) {
|
||||||
return Promise.reject(new Error('CMap name must be specified.'));
|
return Promise.reject(new Error('CMap name must be specified.'));
|
||||||
|
15
web/app.js
15
web/app.js
@ -50,15 +50,6 @@ import { ViewHistory } from './view_history';
|
|||||||
const DEFAULT_SCALE_DELTA = 1.1;
|
const DEFAULT_SCALE_DELTA = 1.1;
|
||||||
const DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000;
|
const DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000;
|
||||||
|
|
||||||
function configure(PDFJS) {
|
|
||||||
if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) {
|
|
||||||
PDFJS.cMapUrl = '../external/bcmaps/';
|
|
||||||
} else {
|
|
||||||
PDFJS.cMapUrl = '../web/cmaps/';
|
|
||||||
}
|
|
||||||
PDFJS.cMapPacked = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const DefaultExternalServices = {
|
const DefaultExternalServices = {
|
||||||
updateFindControlState(data) {},
|
updateFindControlState(data) {},
|
||||||
initPassiveLoading(callbacks) {},
|
initPassiveLoading(callbacks) {},
|
||||||
@ -142,8 +133,6 @@ let PDFViewerApplication = {
|
|||||||
// Called once when the document is loaded.
|
// Called once when the document is loaded.
|
||||||
initialize(appConfig) {
|
initialize(appConfig) {
|
||||||
this.preferences = this.externalServices.createPreferences();
|
this.preferences = this.externalServices.createPreferences();
|
||||||
|
|
||||||
configure(PDFJS);
|
|
||||||
this.appConfig = appConfig;
|
this.appConfig = appConfig;
|
||||||
|
|
||||||
return this._readPreferences().then(() => {
|
return this._readPreferences().then(() => {
|
||||||
@ -298,8 +287,8 @@ let PDFViewerApplication = {
|
|||||||
}
|
}
|
||||||
if ((typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) &&
|
if ((typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) &&
|
||||||
hashParams['disablebcmaps'] === 'true') {
|
hashParams['disablebcmaps'] === 'true') {
|
||||||
PDFJS.cMapUrl = '../external/cmaps/';
|
AppOptions.set('cMapUrl', '../external/cmaps/');
|
||||||
PDFJS.cMapPacked = false;
|
AppOptions.set('cMapPacked', false);
|
||||||
}
|
}
|
||||||
if ('textlayer' in hashParams) {
|
if ('textlayer' in hashParams) {
|
||||||
switch (hashParams['textlayer']) {
|
switch (hashParams['textlayer']) {
|
||||||
|
@ -128,6 +128,17 @@ const defaultOptions = {
|
|||||||
kind: OptionKind.VIEWER,
|
kind: OptionKind.VIEWER,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
cMapPacked: {
|
||||||
|
/** @type {boolean} */
|
||||||
|
value: true,
|
||||||
|
kind: OptionKind.API,
|
||||||
|
},
|
||||||
|
cMapUrl: {
|
||||||
|
/** @type {string} */
|
||||||
|
value: (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION') ?
|
||||||
|
'../external/bcmaps/' : '../web/cmaps/'),
|
||||||
|
kind: OptionKind.API,
|
||||||
|
},
|
||||||
maxImageSize: {
|
maxImageSize: {
|
||||||
/** @type {number} */
|
/** @type {number} */
|
||||||
value: -1,
|
value: -1,
|
||||||
|
Loading…
Reference in New Issue
Block a user