Closed NotWearingPants closed 4 years ago
/JavaScript is automatically executed in /Names under /Catalog, you should only use one of /OpenAction and /Names, not both, this is why the https://github.com/py-pdf/PyPDF2/issues/482 bug occurs, /JavaScript is meaningless under /Catalog, so it is completely ignored by pdf. Just removing the line NameObject("/JavaScript"): js_indirect_object, is enough
Fixes #70
This implements the fix suggested in mstamy2/PyPDF2#482 by @youssef-jaber - replacing
/OpenAction
with/JavaScript
.I'm not actually sure what this does, so I'm open to suggestions if this isn't a good fix.