mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Exposes all functional members via lib exports and use them in viewer.
This commit is contained in:
parent
1d12aed5ca
commit
1e3e14e6b2
25 changed files with 174 additions and 102 deletions
|
@ -2,9 +2,9 @@
|
|||
|
||||
// In production, the bundled pdf.js shall be used instead of RequireJS.
|
||||
require.config({paths: {'pdfjs': '../../src'}});
|
||||
require(['pdfjs/display/api'], function (api) {
|
||||
require(['pdfjs/display/api', 'pdfjs/display/global'], function (api, global) {
|
||||
// In production, change this to point to the built `pdf.worker.js` file.
|
||||
PDFJS.workerSrc = '../../src/worker_loader.js';
|
||||
global.PDFJS.workerSrc = '../../src/worker_loader.js';
|
||||
|
||||
// Fetch the PDF document from the URL using promises.
|
||||
api.getDocument('helloworld.pdf').then(function (pdf) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue