Is it possible to embed JavaScript code in PDFs generated with wkhtmltopdf?
Asked
Active
Viewed 1,716 times
4
-
mid 2016: no it's not possible; or at least it is not documented - and I couldn't find out how this works. It seems like Adobe wants to let the `JavaScript for Acrobat API` die as well. better look for 3rd party printing software - if you wanted to use the embed JavaScript for printing/printer settings. – low_rents May 03 '16 at 15:23
2 Answers
3
In theory yes, the change log for wkhtmltopdf says that this is a feature in the most recent release. Of course the amount you will be able to do with it is limited - and the implementation linked to in that change log is different to the official Adobe documentation.

approxiblue
- 6,982
- 16
- 51
- 59

Gareth
- 133,157
- 36
- 148
- 157
-
the link is dead. I am searching for this feature and now I don't know how it's called in wkhtmltopdf. – low_rents Mar 09 '16 at 10:10
-
2@low_rents Somebody asked on GitHub, so response from the devs yet: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2003 – approxiblue Mar 10 '16 at 02:26
-
@approxiblue but I still don't get it. Gareth says it is possible and there is a documentation. but I can't find a documenation link in the change log. – low_rents Apr 05 '16 at 13:11
-2
I don't think it is possible. The pdf converter only render follows your final html output... Javascript always run when load or some interact with DOM. So it is not possible.

John
- 5
- 1