1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Use already downloaded data for the open with/save as dialog.

This commit is contained in:
Brendan Dahl 2012-06-01 14:17:09 -07:00
parent 8ae9c7dcbd
commit 6175e4b526
5 changed files with 166 additions and 34 deletions

View file

@ -136,6 +136,10 @@ var WorkerMessageHandler = {
handler.send('GetPage', {pageInfo: page});
});
handler.on('GetData', function wphSetupGetData(data, promise) {
promise.resolve(pdfModel.stream.bytes);
});
handler.on('GetAnnotationsRequest', function wphSetupGetAnnotations(data) {
var pdfPage = pdfModel.getPage(data.pageIndex + 1);
handler.send('GetAnnotations', {