Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed addJS running twice #72

Merged
merged 1 commit into from
Jun 21, 2020

Conversation

NotWearingPants
Copy link

Fixes #70

This implements the fix suggested in py-pdf#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.

@claird claird merged commit a2561ce into claird:master Jun 21, 2020
@douniwan5788
Copy link

/JavaScript is automatically executed in /Names under /Catalog, you should only use one of /OpenAction and /Names, not both, this is why the py-pdf#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Javascript code added via addJS gets executed twice
3 participants