How to add an annotation with javascript action

Annotation have a method to associate an action executed by a click.
This action could be an URI.
Is it possible to add an action with a javascript.

Fabien

@fabien.levalois

In case you want to open an URI by clicking over content, you can use LinkAnnotation. In case your requirements are different, can you please share what type of annotation you are using? It would also be helpful if you can please share an expected output PDF so that we can try to generate similar one in our environment and share our feedback with you.

The annotation is a link annotation see below the object pdf description
image.png (64.6 KB)
And the PDF out put
downloadpacha.pdf (574.4 KB)

tell me if you need more things

Fabien

@fabien.levalois

We request you to please add a link annotation in your PDF using Aspose.PDF and check the generated output to see if you are receiving similar results as shown in the shared image? Please share the image of object PDF description with us again in case you find it different. We will further proceed to assist you accordingly.

add a link annotation explain how to add an GoToUriAction and with it I can’t specify a javascript.
could you explain to set an action with javascript when i create a link with aspose.

Fabien

@fabien.levalois

We need to further investigate the feasibility of your requirements. For the sake of it, we have logged an investigation ticket as PDFJAVA-40923 in our issue tracking system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

thank to keep me in touch about this tickey

1 Like