Bug 428283

Summary: JS: Add support for buttonImportIcon
Product: [Applications] okular Reporter: David Faure <faure>
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: CONFIRMED ---    
Severity: normal CC: aacid, justin.zobel
Priority: NOR    
Version: 1.11.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: pdf file

Description David Faure 2020-10-26 16:34:24 UTC
SUMMARY

In the attached document, the scripting seems to fail with okular.

STEPS TO REPRODUCE
1. Open PDF
2. Click "Show Forms"
3. Click the big button "Insérer Image/Photo"

OBSERVED RESULT

stderr says "evaluate() threw an exception"

EXPECTED RESULT

I'm guessing a file dialog is supposed to show up

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.20.1
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
Okular rocks.
Comment 1 David Faure 2020-10-26 16:35:02 UTC
Created attachment 132766 [details]
pdf file
Comment 2 Albert Astals Cid 2020-10-26 23:01:10 UTC
The file uses buttonImportIcon

Described as 

Imports the appearance of a button from another PDF file. If neither optional parameter is passed, the user
is prompted to select a file.

Interesting one ^_^

Will also need poppler support since there's no way to set an arbitrary icon in poppler (i..e that's why stamps don't really work well yet)
Comment 3 Justin Zobel 2020-10-27 00:16:41 UTC
Confirmed no dialog appears to select a file.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.20.80
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.0