Bug 450453

Summary: JavaScript filling other form fields in PDF not working
Product: [Applications] okular Reporter: now <nwegener>
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: CONFIRMED ---    
Severity: normal CC: sz.rutkowski
Priority: NOR    
Version First Reported In: 21.08.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Official paper from French government with form fields

Description now 2022-02-17 12:31:14 UTC
Created attachment 146862 [details]
Official paper from French government with form fields

SUMMARY
The attached pdf contains form fields, where it is intended, that entries on page one also appear in the corresponding fields of page 3 and 5, the same with page 2 and 4,6. This does not work for me.


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Szymon Rutkowski 2022-02-24 21:02:12 UTC
Hi, thanks for reporting.

The reporter expects the data entered into form fields in the pages 1-2 to be automatically replicated on the subsequent pages (with different language versions of the document). This works on the official Adobe reader, at least on Windows.

This seems related to embedded JavaScript in the document. For example, the PDF object number 297 contains the snippet "event.value=this.getField("b4").value;", which (I assume) fills the field with the value of another field and (I also assume) this is not executed.

Similar, not quite the same bugs:
https://bugs.kde.org/show_bug.cgi?id=271728
https://bugs.kde.org/show_bug.cgi?id=307304
https://bugs.kde.org/show_bug.cgi?id=403632
Older broad tickets about JS, I don't know about their current actual status:
https://bugs.kde.org/show_bug.cgi?id=223022
https://bugs.kde.org/show_bug.cgi?id=258941
https://bugs.kde.org/show_bug.cgi?id=306855

The example file(s) can be also downloaded from: https://www.impots.gouv.fr/formulaire/5000-sd/attestation-de-residence-destinee-ladministration-etrangere