Bug 472764 - PDF form dropdown doesn't show up
Summary: PDF form dropdown doesn't show up
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 23.04.3
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-28 22:40 UTC by Juan Navarro
Modified: 2023-08-10 08:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Video showing the expected behavior (using Acrobat Reader) (1.62 MB, video/x-matroska)
2023-07-28 22:40 UTC, Juan Navarro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juan Navarro 2023-07-28 22:40:00 UTC
Created attachment 160598 [details]
Video showing the expected behavior (using Acrobat Reader)

SUMMARY

A PDF form contains dropdowns with selectable choices. These don't show up in Okular.

Using Okular v23.04.3, the latest version available in Flathub (https://flathub.org/apps/org.kde.okular) as of today. Underlying platform is Ubuntu 20.04.


STEPS TO REPRODUCE

1. Open the PDF file that was attached to bug report #472756 (https://bugs.kde.org/show_bug.cgi?id=472756). I'm just linking to the other bug report in order to save on storage; if it's preferred that each report has its own attachments, please tell me and I will duplicate it here.

2. A header bar shows up in Okular, saying that "This document has forms. Click on the button to interact with them, or use View -> Show Forms."
Click the "Show Forms" button.

3. On the left-half of the document, on the very first cell of the table (top-left) containing the text "Calle, plaza, avda., etc.", there is a dropdown.
Pushing on its button does nothing.

4. On the right-half of the document, on the cell of the table containing the text "Nivel de estudios terminados", there is a dropdown.
Pushing on its button does nothing.


OBSERVED RESULT

* Pushing on the dropdown of step 3 does nothing. The list of choices doesn't show up.
* Pushing on the dropdown of step 4 does nothing. The list of choices doesn't show up.


EXPECTED RESULT

* Pushing on the dropdown of step 3 shows a list of strings. Selecting one, puts the text of that entry into the nearby text field.
* Pushing on the dropdown of step 4 shows a list of numbered strings. Selecting one, puts the number of that entry into the nearby text field.


SOFTWARE/OS VERSIONS

As per Flatpak package indicated above:
Name        Description          Application ID      Version      Branch      Remotes
Okular      Document Viewer      org.kde.okular      23.04.3      stable      flathub

Running on an Ubuntu 20.04 system.


ADDITIONAL INFORMATION

The exact same issue can be seen in other programs tested:
* Xreader v3.2.2
* Firefox v115
* Chromium v114

Given that it doesn't work elsewhere, I'm inclined to think that it might be a problem with the PDF file itself, and not a problem with Okular. Nevertheless, I'm reporting as maybe this opens up the chance to improve something in Okular.

Attaching a screen capture video where the expected behavior is shown.
This was captured using Acrobat Reader on Windows.
Both dropdowns described at steps 3 and 4 show up and allow to select a single option.
Comment 1 Bug Janitor Service 2023-08-01 23:26:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/788
Comment 2 Albert Astals Cid 2023-08-05 18:58:36 UTC
Git commit 532cb0cdcdd008fedb42f0a3ec690400b65820e1 by Albert Astals Cid.
Committed on 05/08/2023 at 20:20.
Pushed by aacid into branch 'master'.

Initial implementation of app.popUpMenuEx

It is defenitely not a full implementation but it's enough for the one
file we have that needs it for now

M  +21   -0    core/document.cpp
M  +7    -0    core/document.h
M  +4    -0    core/script/builtin.js
M  +24   -12   core/script/event.cpp
M  +2    -1    core/script/event_p.h
M  +28   -0    core/script/js_app.cpp
M  +2    -0    core/script/js_app_p.h
M  +2    -1    core/script/js_event.cpp
M  +7    -2    part/formwidgets.cpp
M  +3    -0    part/formwidgets.h
M  +10   -0    part/pageview.cpp
M  +2    -0    part/pageview.h

https://invent.kde.org/graphics/okular/-/commit/532cb0cdcdd008fedb42f0a3ec690400b65820e1
Comment 3 Juan Navarro 2023-08-10 08:54:37 UTC
(In reply to Albert Astals Cid from comment #2)
> Git commit 532cb0cdcdd008fedb42f0a3ec690400b65820e1 by Albert Astals Cid.
> Committed on 05/08/2023 at 20:20.
> Pushed by aacid into branch 'master'.
> 
> Initial implementation of app.popUpMenuEx
> 
> It is defenitely not a full implementation but it's enough for the one
> file we have that needs it for now
> 

Thank you very much for your work! Okular now will be better PDF viewer than others even the pdf.js used in browsers, where the menu didn't show up either for me :)