Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Refactored API

268 views
Skip to first unread message

Brendan Dahl

unread,
Apr 16, 2012, 1:20:28 PM4/16/12
to dev-p...@lists.mozilla.org
Hello All,

We've pushed a new API today that is a big step forward and will help us implement several new features. Unfortunately, the new API is not compatible with previous versions of pdf.js, though it is very similar.

Overall, we have moved to a more asynchronous API that uses promises for any operations need to communicate with the worker thread to do processing.

Some highlights:
- less memory usage
- less work in the main thread
- central documented API

Future features:
- partial loading of PDF's
- offload even more work to the workers

Simple example of how working with the new API looks:
https://github.com/mozilla/pdf.js/blob/master/examples/helloworld/hello.js

For documentation see:
https://github.com/mozilla/pdf.js/blob/master/src/api.js
https://github.com/mozilla/pdf.js/issues/1100#issuecomment-5103242


Thanks,
The pdf.js Team
0 new messages