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:
parent
69d7191034
commit
b69abf1111
6 changed files with 19 additions and 16 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue