You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Евгений Король <ff...@gmail.com> on 2019/06/04 08:41:10 UTC

Get JS Code from Action

Hello. I have a trouble to get JavaScript code from Action object from
PDF file. For example, i have annotation type PDAnnotationLink. In
this annotation i have Action. From PDF Debugger i can see JS code of
Action. But how can i get this from my code?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Get JS Code from Action

Posted by Gilad Denneboom <gi...@gmail.com>.
Cast the PDAction object you get from getAction to PDActionJavaScript and
then use the getAction method to get a string with the code.

On Tue, Jun 4, 2019 at 10:41 AM Евгений Король <ff...@gmail.com> wrote:

> Hello. I have a trouble to get JavaScript code from Action object from
> PDF file. For example, i have annotation type PDAnnotationLink. In
> this annotation i have Action. From PDF Debugger i can see JS code of
> Action. But how can i get this from my code?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>