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:
parent
142f131ee1
commit
1e2173f038
18 changed files with 829 additions and 125 deletions
|
@ -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");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue