mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
[api-major] Completely remove the global PDFJS
object
This commit is contained in:
parent
4b4fcecf70
commit
b8606abbc1
18 changed files with 323 additions and 426 deletions
|
@ -34,12 +34,12 @@
|
|||
//
|
||||
// The workerSrc property shall be specified.
|
||||
//
|
||||
PDFJS.GlobalWorkerOptions.workerSrc =
|
||||
pdfjsDistBuildPdf.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.
|
||||
PDFJS.getDocument({data: pdfData}).then(function getPdfHelloWorld(pdf) {
|
||||
pdfjsDistBuildPdf.getDocument({data: pdfData}).then(function getPdfHelloWorld(pdf) {
|
||||
// Fetch the first page.
|
||||
pdf.getPage(1).then(function getPageHelloWorld(page) {
|
||||
var scale = 1.5;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue