1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 09:38:06 +02:00

JS - Collect and execute actions at doc and pages level

* the goal is to execute actions like Open or OpenAction
 * can be tested with issue6106.pdf (auto-print)
 * once #12701 is merged, we can add page actions
This commit is contained in:
Calixte Denizet 2020-12-07 19:22:14 +01:00
parent 142f131ee1
commit 1e2173f038
18 changed files with 829 additions and 125 deletions

View file

@ -481,6 +481,16 @@ class WorkerMessageHandler {
return pdfManager.ensureCatalog("javaScript");
});
handler.on("GetDocJSActions", function wphSetupGetDocJSActions(data) {
return pdfManager.ensureCatalog("jsActions");
});
handler.on("GetPageJSActions", function ({ pageIndex }) {
return pdfManager.getPage(pageIndex).then(function (page) {
return page.jsActions;
});
});
handler.on("GetOutline", function wphSetupGetOutline(data) {
return pdfManager.ensureCatalog("documentOutline");
});