Skip to content
Advertisement

Add Javascript to PDF file using iText7 C#

I am trying to add javascript to my PDF file using iText7 library and C#

Currently, here is my code…which is by far not finish yet

JavaScript

I want to add this javascript to my PDF and also download the file after it is finished adding the Javascript. Is there anybody that knows how to add Javascript to pdf? thanks

Advertisement

Answer

You can add the Javascript snippet as a document level OpenAction, to be executed when the document is opened:

JavaScript

Javascript popup

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement