After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 338721 - Support Javascript in PDF Documents
Support Javascript in PDF Documents
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: PDF
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 352362 637232 785533 (view as bug list)
Depends on:
Blocks: 635055 667622 686724 741615
 
 
Reported: 2006-04-16 17:32 UTC by Troy Henderson
Modified: 2018-05-22 13:08 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Troy Henderson 2006-04-16 17:32:41 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.
Comment 1 Reinout van Schouwen 2009-02-03 22:05:32 UTC
Evince could use JavascriptCore, according to the folks on #webkit-gtk.
Comment 2 Nickolay V. Shmyrev 2009-02-03 22:44:30 UTC
*** Bug 352362 has been marked as a duplicate of this bug. ***
Comment 3 Carlos Garcia Campos 2010-12-14 14:42:44 UTC
It probably needs changes in poppler too.
Comment 4 Neal McBurnett 2011-01-02 22:21:45 UTC
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?
Comment 5 José Aliste 2011-01-02 22:30:22 UTC
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.
Comment 6 José Aliste 2011-03-28 17:25:44 UTC
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.
Comment 7 Ismael Olea 2011-05-16 11:28:22 UTC
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
Comment 8 Christian 2011-12-21 18:09:56 UTC
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.
Comment 9 Thomas U. 2013-07-30 08:57:51 UTC
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
Comment 10 Germán Poo-Caamaño 2013-07-30 16:38:29 UTC
(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).
Comment 11 José Aliste 2013-10-31 02:35:36 UTC
*** Bug 637232 has been marked as a duplicate of this bug. ***
Comment 12 Anton Kochkov 2017-03-20 07:32:34 UTC
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?
Comment 13 Germán Poo-Caamaño 2017-10-02 14:34:33 UTC
*** Bug 785533 has been marked as a duplicate of this bug. ***
Comment 14 GNOME Infrastructure Team 2018-05-22 13:08:42 UTC
-- 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.