Bug 479777 - Altium Designer PDF popup doesn't show up
Summary: Altium Designer PDF popup doesn't show up
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 24.01.90
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-14 00:37 UTC by Alexis Murzeau
Modified: 2024-01-20 04:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 24.05


Attachments
PDF with app.popUpMenu (2.44 MB, application/pdf)
2024-01-14 00:37 UTC, Alexis Murzeau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Murzeau 2024-01-14 00:37:43 UTC
Created attachment 164888 [details]
PDF with app.popUpMenu

SUMMARY

Altium Designer PDF are schematic that allows opening a popup with additional information by the use of app.popUpMenu inside the PDF.
app.popUpMenuEx is implemented, but not app.popUpMenu, so nothing is shown.


STEPS TO REPRODUCE
1. Open a Altium Designer PDF (see attachment)
2. Go to page 3
3. Click on one of the component (the mouse change to a hand on them)


OBSERVED RESULT
Nothing happens

EXPECTED RESULT
A popup should be shown with additional informations.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10
Kernel Version: 6.6.9-amd64 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-3230M CPU @ 2.60GHz
Memory: 7.6 Gio of RAM
Graphics Processor: Mesa Intel® HD Graphics 4000
Manufacturer: Sony Corporation
Product Name: SVE1513Q1EB
System Version: C10GMJY7

Okular version v24.01.90 (from git)

ADDITIONAL INFORMATION
I've prepared a patch which fixes the issue.
Comment 1 Bug Janitor Service 2024-01-14 00:38:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/911
Comment 2 Sune Vuorela 2024-01-17 19:18:17 UTC
Git commit 2609f4001add186e34f4e649f6c1096e3b499f2f by Sune Vuorela, on behalf of Alexis Murzeau.
Committed on 17/01/2024 at 20:01.
Pushed by sune into branch 'master'.

Add support for app.popUpMenu and submenus in popUpMenuEx

These functions from `app` are JS functions that can be used by PDF
files.

Based on popUpMenuEx, the implementation of popUpMenu converts arguments
to app.popUpMenuEx format and then call it.

The popMenuEx function is improved to handle submenus as well using
`oSubMenu`.

app.popUpMenu is used in Altium Designer and EasyEDA exported PDFs.
See an example here:
https://www.st.com/en/evaluation-tools/32f723ediscovery.html#cad-resources
https://www.st.com/resource/en/schematic_pack/mb1260-f723e-d03_schematic.pdf

M  +146  -0    autotests/jsfunctionstest.cpp
M  +42   -0    core/script/builtin.js
M  +34   -10   core/script/js_app.cpp
M  +2    -0    core/script/js_app_p.h

https://invent.kde.org/graphics/okular/-/commit/2609f4001add186e34f4e649f6c1096e3b499f2f