1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-21 15:48:06 +02:00

Move the disableRange option from the global PDFJS object and into getDocument instead

This commit is contained in:
Jonas Jenwald 2018-02-17 22:22:10 +01:00
parent 69d7191034
commit b69abf1111
6 changed files with 19 additions and 16 deletions

View file

@ -359,7 +359,6 @@ var Driver = (function DriverClosure() { // eslint-disable-line no-unused-vars
this._log('Loading file "' + task.file + '"\n');
let absoluteUrl = new URL(task.file, window.location).href;
PDFJS.disableRange = task.disableRange;
try {
PDFJS.getDocument({
url: absoluteUrl,
@ -367,6 +366,7 @@ var Driver = (function DriverClosure() { // eslint-disable-line no-unused-vars
nativeImageDecoderSupport: task.nativeImageDecoderSupport,
cMapUrl: CMAP_URL,
cMapPacked: CMAP_PACKED,
disableRange: task.disableRange,
disableAutoFetch: !task.enableAutoFetch,
}).then((doc) => {
task.pdfDoc = doc;