GNOME Bugzilla – Bug 338721
Support Javascript in PDF Documents
Last modified: 2018-05-22 13:08:42 UTC
I would like to have JavaScript features added in Evince. In particular, it would be nice to be able to play the animation that I created using MetaPost and PDFLaTeX. http://www.tlhiv.org/antiderivative.pdf This plays just fine in the Adobe reader. The animation is created simply by having JavaScript change the frames in the animation.
Evince could use JavascriptCore, according to the folks on #webkit-gtk.
*** Bug 352362 has been marked as a duplicate of this bug. ***
It probably needs changes in poppler too.
There is now at least some support for Javascript as of poppler 0.9. What else is involved in getting javascript for documents like http://media.texample.net/tikz/examples/PDF/animated-definite-integral.pdf I wonder?
Getting javascript to work is VERY difficult task to implement (in my opinion). First, the source of MOST of the security nightmares in the PDF standard comes from the support for Javascript, so you need to keep that in mind when implementing. About poppler's support for javascript, the thing that is supported is to detect javascript scripts and be able to read them into a string so then you can pass it to the Javascript interpreter, but there is no Javascript interpreter at all. To implement javascript, we basically need to add a Dictionary between Objects inside the PDF and Javascript Objects, but to get this exactly as described in the Acrobat Javascript API Reference is not easy at all (in my opinion). That being said, we should add support for javascript, but it is not 100 lines of code away, and certainly we appreaciate any help we can get to support this.
So, I am changing the title so we can gather here some of the pdf files with javascript for which we want to implement Javascript Support, and make other bugs depend on this one.
This document can be a test case: https://gestiona.madrid.org/ereg_virtual/html/web/Formulario.icm?nombre=312F1&icm_reservado=1%27 Sadly, it seems you can only download if you have an official Spanish X509 certificate
Another test file publicly available: http://www.impotsdirects.public.lu/formulaires/pers_physiques/2010/200F_2010.pdf It's in French but you can easily enter some numbers and see the total at the bottom of the first page. It's working in acroread 9.4.6. Not working in evince 3.2.1.
Hi! I just wanted to ping this bug, since it has been open very long and hasn't been modified/updated in over a year. I've recently stumbled upon this when I tried to include animated graphics into my document using the 'animate' latex package (which requires JS support in the pdf viewer). While googling for solutions I found a few other people who have the exact same problem, so I know I'm not alone. I'd appreciate it if maybe you could maybe re-evaluate adding JS support for PDF documents. Cheers
(In reply to comment #9) > I'd appreciate it if maybe you could maybe re-evaluate adding JS support for > PDF documents. It is about somebody with the skills stepping up to implement it in poppler (the library that evince depends on).
*** Bug 637232 has been marked as a duplicate of this bug. ***
4 years passed, poppler said they've implemented everything needed in this bug https://bugs.freedesktop.org/show_bug.cgi?id=14433 Any updates on this one?
*** Bug 785533 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/24.