How to add an image to Pdf Page in Javascript?

I want to show an image (jpeg) in the pdf using JavaScript console. How can I do it in JavaScript?


Salman Virk


Voted Best Answer

There is no tool to directly insert an image in the document with JavaScript.

Probably the easiest way would be creating a Button field where the image should go, and then use importIcon() to import the image, and buttonSetIcon() to insert it into the field.

Hope this can help.

Max Wyss.


By Max Wyss   


Please specify a reason: