From 70e3345cb419b5b319c82ffb1222aa990ec13aec Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 24 Dec 2019 10:19:59 +0100 Subject: [PATCH] Support OpenAction dictionaries without `Type` entries when parsing `Print` actions (issue 11442) The PDF generator didn't bother including the `Type` entry in the OpenAction dictionary, hence we skipped parsing the `Print` action. --- src/core/obj.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/obj.js b/src/core/obj.js index afa59bfd5..b50fd56c2 100644 --- a/src/core/obj.js +++ b/src/core/obj.js @@ -625,7 +625,9 @@ class Catalog { // Append OpenAction actions to the JavaScript array. const openActionDict = this.catDict.get('OpenAction'); - if (isDict(openActionDict, 'Action')) { + if (isDict(openActionDict) && + (isName(openActionDict.get('Type'), 'Action') || + !openActionDict.has('Type'))) { const actionType = openActionDict.get('S'); if (isName(actionType, 'Named')) { // The named Print action is not a part of the PDF 1.7 specification,