mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Move the workerSrc
option from the global PDFJS
object and into GlobalWorkerOptions
instead
This commit is contained in:
parent
45adf33187
commit
c3c1fc511d
20 changed files with 69 additions and 60 deletions
|
@ -22,7 +22,8 @@
|
|||
//
|
||||
// The workerSrc property shall be specified.
|
||||
//
|
||||
PDFJS.workerSrc = '../../node_modules/pdfjs-dist/build/pdf.worker.js';
|
||||
PDFJS.GlobalWorkerOptions.workerSrc =
|
||||
'../../node_modules/pdfjs-dist/build/pdf.worker.js';
|
||||
|
||||
//
|
||||
// Asynchronous download PDF
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
//
|
||||
// The workerSrc property shall be specified.
|
||||
//
|
||||
PDFJS.workerSrc = '../../node_modules/pdfjs-dist/build/pdf.worker.js';
|
||||
PDFJS.GlobalWorkerOptions.workerSrc =
|
||||
'../../node_modules/pdfjs-dist/build/pdf.worker.js';
|
||||
|
||||
// Opening PDF by passing its binary data as a string. It is still preferable
|
||||
// to use Uint8Array, but string or array-like structure will work too.
|
||||
|
|
|
@ -33,7 +33,8 @@
|
|||
// pdf.js's one, or the pdf.js is executed via eval(), the workerSrc property
|
||||
// shall be specified.
|
||||
//
|
||||
// PDFJS.workerSrc = '../../node_modules/pdfjs-dist/build/pdf.worker.js';
|
||||
// PDFJS.GlobalWorkerOptions.workerSrc =
|
||||
// '../../node_modules/pdfjs-dist/build/pdf.worker.js';
|
||||
|
||||
var pdfDoc = null,
|
||||
pageNum = 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue