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

Async getAnnotations(); hide map and xref for Dict

This commit is contained in:
Yury Delendik 2012-04-14 13:54:31 -07:00
parent 19c0c6a983
commit 42911f1fc9
4 changed files with 63 additions and 38 deletions

View file

@ -100,20 +100,27 @@ var WorkerMessageHandler = {
handler.send('GetDoc', {pdfInfo: doc});
});
handler.on('GetPageRequest', function wphSetupTest(data) {
handler.on('GetPageRequest', function wphSetupGetPage(data) {
var pageNumber = data.pageIndex + 1;
var pdfPage = pdfModel.getPage(pageNumber);
var page = {
pageIndex: data.pageIndex,
rotate: pdfPage.rotate,
ref: pdfPage.ref,
view: pdfPage.view,
annotations: pdfPage.getAnnotations()
view: pdfPage.view
};
handler.send('GetPage', {pageInfo: page});
});
handler.on('RenderPageRequest', function wphSetupPageRequest(data) {
handler.on('GetAnnotationsRequest', function wphSetupGetAnnotations(data) {
var pdfPage = pdfModel.getPage(data.pageIndex + 1);
handler.send('GetAnnotations', {
pageIndex: data.pageIndex,
annotations: pdfPage.getAnnotations()
});
});
handler.on('RenderPageRequest', function wphSetupRenderPage(data) {
var pageNum = data.pageIndex + 1;
@ -170,7 +177,6 @@ var WorkerMessageHandler = {
fonts[dep] = true;
}
}
handler.send('RenderPage', {
pageIndex: data.pageIndex,
operatorList: operatorList,