evince does not calculate total sum in application form

Bug #371618 reported by Andriy Tymchenko
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evince
Unknown
Medium
Poppler
Unknown
Wishlist
evince (Ubuntu)
Triaged
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: evince

I have PDF http://lomake.kansanelakelaitos.fi/kela/kela.fi/fi/tiedostot/21100/SV4_W.pdf which is essentially "claim for travel reimbursement from government pension/social fund in Finland".

Functionality which is broken - it does not calculate total on rightmost column while any Adobe Acrobat Reader does it.

To reproduce it, you don't have to understand Finnish language -- merely fill money values like yyyy,xx into right column (decimal separator is "comma" in Finland!) and move focus of input out from the right column. It should make total in field (under right column in table) marked with text "Matkakustannukset yhteensä euroa" (travel expenses total in Euro) - it does not in evince.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/bin/evince
NonfreeKernelModules: nvidia
Package: evince 2.26.0-0ubuntu1
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
SourcePackage: evince
Uname: Linux 2.6.28-11-generic i686

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

More and more PDF are using JavaScript, we should try to support it, sometime, somewhen.

Revision history for this message
In , Jeff Muizelaar (jeff-infidigm) wrote :

This should probably be done using spidermonkey as the javascript interpreter. It is used by acrobat (http://www.adobe.com/devnet/logged_in/ehuang_tamarin.html)

Revision history for this message
Andriy Tymchenko (silpol) wrote :
Changed in evince (Ubuntu):
importance: Undecided → Low
Revision history for this message
Pedro Villavicencio (pedro) wrote :

could be that poppler is not reading that data, setting this to confirmed, should be send upstream.

Changed in evince (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
status: New → Confirmed
Changed in evince:
status: Unknown → New
Changed in evince (Ubuntu):
status: Confirmed → Triaged
Changed in evince:
importance: Unknown → Medium
status: New → Confirmed
Revision history for this message
In , Albert Astals Cid (aacid) wrote :

*** Bug 32424 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Leonardo Ferreira Fontenelle (leonardof) wrote :

I really understand that you consider this an enhancement request, but I must say that as a user I see it as a bug, since the document doesn't work as expected.

Anyway, just dropped to say I closed a bug report for Evince as NOTGNOME, and provided a link to this bug report. The former bug report is:

https://bugzilla.gnome.org/show_bug.cgi?id=480324

Changed in evince:
status: Confirmed → Unknown
Revision history for this message
In , antistress (antistress) wrote :

This fix seems to be needed for Evince (GNOME) to handle automatic calculation with PDF fillable forms
Any plan about it ?
Mozilla's work on pdf.js (which could soon be integrated within Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=714712 ) could be helpful maybe ?

Revision history for this message
In , Germán Poo-Caamaño (gpoo) wrote :

Created attachment 67189
PDF test case with an animation in JavaScript

I am adding a test case of JavaScript. This was reported in GNOME several years ago. https://bugzilla.gnome.org/show_bug.cgi?id=338721

When I tried to get the annotations using poppler-glib-demo (master b72c02d1a2e), I got the following output:

Syntax Error: Can't get Fields array

However, it got 6 widgets, which were not rendered.

Revision history for this message
In , Germán Poo-Caamaño (gpoo) wrote :

Is this a duplicate of #14265?

Revision history for this message
In , Jose-aliste-m (jose-aliste-m) wrote :

(In reply to comment #6)
> Is this a duplicate of #14265?

Nope, I would say that #14265 depends on this bug.

Changed in poppler:
importance: Unknown → Wishlist
status: Unknown → Confirmed
Revision history for this message
In , James E. LaBarre (jamesl-bestweb) wrote :

It's more than calculations and such; I've encountered a document that has a "helpscreen" overlay that you are supposed to click on to make the box go away when you're done reading it. But since it is apparently using javascript to do it, you cannot get rid of the box, which covers a majority of the page, and tehrefore cannot fill out the fields. So no, not an enhancement, definitely a bug, since the document is completely unusable without the JS support.

https://apps.health.ny.gov/doh2/applinks/accessny//forms/DOHAccessNyMainForm.pdf

(the file is 3.5M, so too large to attach here).

Revision history for this message
In , Jose-aliste-m (jose-aliste-m) wrote :

(In reply to comment #8)
> It's more than calculations and such; I've encountered a document that has a
> "helpscreen" overlay that you are supposed to click on to make the box go
> away when you're done reading it. But since it is apparently using
> javascript to do it, you cannot get rid of the box, which covers a majority
> of the page, and tehrefore cannot fill out the fields. So no, not an
> enhancement, definitely a bug, since the document is completely unusable
> without the JS support.
>
> https://apps.health.ny.gov/doh2/applinks/accessny//forms/DOHAccessNyMainForm.
> pdf
>
Actually this files has something like this AA << /D <</S/Hide /T(Help1)>> >>
so when clicking on the help widget, it should go away. So at least this is NOT related to our lack of javascript but two bugs in poppler. One is that we don't support Hide actions and the other is that the glib frontend does not support additional actions... these two should be filed as different bugs (and I will do so later)

> (the file is 3.5M, so too large to attach here).

Revision history for this message
In , Octalfdo (octalfdo) wrote :

If this gets implemented one day:

Considering that JavaScript can be used for malicious purposes, please consider providing a facility for allowing poppler-based applications to let interested end-users enable JS on a per-document basis.

Revision history for this message
In , Martin Kepplinger (martin-kepplinger) wrote :

So here's the reference manual: https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf

There are interesting use cases for javascript in pdf files. The gnome desktop would benefit if supported!

Maybe consider offering this as part of GSoC or something?

Revision history for this message
In , Sivmu (sivmu) wrote :

Please do NOT support more javascript features.
Javascript is one of the most aweful things to put in pdf and an exellent target for malware.

There would be a lot of new security issues coming along with it.

In case one day there will be javascript inside poppler beyond formular filling, please provide a simple waz for users to disable it.

Revision history for this message
In , Albert Astals Cid (aacid) wrote :

Actaully I think we should close this bug.

We already export the Javascript from the poppler side and for example Okular supports it partially https://www.youtube.com/watch?v=S-zmHc3WUhs

I don't think we could actually do that from within the core of poppler since it needs to know things as edit/validate/undo/redo.

So from what i can see we already "support" Javascript, i.e. extract its contents.

Revision history for this message
Michael Abbott (michael-araneidae) wrote :

In case a persuasive use case for this functionality were needed, here is a UK government form that makes use of calculated fields: https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/459092/IHT205_2011_.pdf (Inheritance Tax: return of Estate Information IHT205).

I agree that the execution of JavaScript should be optional, and indeed should be turned off by default ... but alas I see there isn't any way to turn it on at present.

Interestingly, there appears to be no alternative to using Windows (or maybe OSX?) for filling in a PDF form if the calculated fields are mandatory, at least I've not found *anything* after quite a bit of searching. In my case I'll write the computed values in by hand.

Revision history for this message
In , Bugzilla-x (bugzilla-x) wrote :
Revision history for this message
In , Gitlab-migration (gitlab-migration) wrote :

-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org'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.freedesktop.org/poppler/poppler/issues/162.

Changed in poppler:
status: Confirmed → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.