mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
JS -- Add tests for print/save actions
* change PDFDocument::hasJSActions to return true when there are JS actions in catalog.
This commit is contained in:
parent
df53e7811c
commit
ffd4bc790c
8 changed files with 144 additions and 453 deletions
|
@ -1038,10 +1038,11 @@ class PDFDocument {
|
|||
"hasJSActions",
|
||||
this.fieldObjects.then(fieldObjects => {
|
||||
return (
|
||||
fieldObjects !== null &&
|
||||
Object.values(fieldObjects).some(fieldObject =>
|
||||
fieldObject.some(object => object.actions !== null)
|
||||
)
|
||||
(fieldObjects !== null &&
|
||||
Object.values(fieldObjects).some(fieldObject =>
|
||||
fieldObject.some(object => object.actions !== null)
|
||||
)) ||
|
||||
!!this.catalog.jsActions
|
||||
);
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue