Bug 474256 - KF5JS to Qt5Qml Transition: JavaScript-driven animations in PDFs no longer working
Summary: KF5JS to Qt5Qml Transition: JavaScript-driven animations in PDFs no longer wo...
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 23.08.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-07 11:51 UTC by a.grahn
Modified: 2023-09-11 17:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 23.08.1
Sentry Crash Report:


Attachments
Example PDF with embedded JS-driven animation. (99.06 KB, application/pdf)
2023-09-07 11:51 UTC, a.grahn
Details
LaTeX source file of animation example (175 bytes, text/x-tex)
2023-09-07 11:53 UTC, a.grahn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description a.grahn 2023-09-07 11:51:24 UTC
Created attachment 161493 [details]
Example PDF with embedded JS-driven animation.

SUMMARY

JavaScript-driven PDF animations stopped working in Okular-23.08.0

STEPS TO REPRODUCE
1. Open attached animationExample.pdf in Okular-23.08.0
2. Click on the Play button below the animation

OBSERVED RESULT

The animation does not start playing.

EXPECTED RESULT

PDF animations used to work in previous Okular versions (tested in v. 23.04.3).

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

ADDITIONAL INFORMATION:

The LaTeX source of animationExample.pdf. Run command pdflatex twice to rebuild the PDF.

\documentclass[border=3pt]{standalone}

\usepackage{animate}
\usepackage{graphicx}

\begin{document}
\animategraphics[controls,width=2in]{1}{example-movie}{}{}
\end{document}
Comment 1 a.grahn 2023-09-07 11:53:53 UTC
Created attachment 161494 [details]
LaTeX source file of animation example
Comment 2 Bug Janitor Service 2023-09-07 14:40:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/817
Comment 3 Albert Astals Cid 2023-09-11 17:43:52 UTC
Git commit bb102528ee807e05f66516d5b3987ab986d0583f by Albert Astals Cid, on behalf of Volker Krause.
Committed on 11/09/2023 at 19:36.
Pushed by aacid into branch 'master'.

The nFace argument in PDF JS button icon methods is optional

M  +2    -2    core/script/js_field_p.h

https://invent.kde.org/graphics/okular/-/commit/bb102528ee807e05f66516d5b3987ab986d0583f
Comment 4 Albert Astals Cid 2023-09-11 17:43:53 UTC
Git commit e41f682b3d1b1382aebda8c5575b53295ddf01df by Albert Astals Cid, on behalf of Volker Krause.
Committed on 11/09/2023 at 19:36.
Pushed by aacid into branch 'master'.

Fix creation of new JS objects

A default constructed QJSValue is undefined, not an object.
FIXED-IN: 23.08.1

M  +1    -1    core/script/js_app.cpp
M  +1    -1    core/script/js_document.cpp
M  +1    -1    core/script/js_field.cpp

https://invent.kde.org/graphics/okular/-/commit/e41f682b3d1b1382aebda8c5575b53295ddf01df
Comment 5 Albert Astals Cid 2023-09-11 17:45:09 UTC
Git commit 60a634a36e5e235b14c28cce71183c76146f4d6c by Albert Astals Cid, on behalf of Volker Krause.
Committed on 11/09/2023 at 19:44.
Pushed by aacid into branch 'release/23.08'.

The nFace argument in PDF JS button icon methods is optional
(cherry picked from commit bb102528ee807e05f66516d5b3987ab986d0583f)

M  +2    -2    core/script/js_field_p.h

https://invent.kde.org/graphics/okular/-/commit/60a634a36e5e235b14c28cce71183c76146f4d6c
Comment 6 Albert Astals Cid 2023-09-11 17:45:10 UTC
Git commit 0f896f779d4969c7c1f04468faf197796cd712ad by Albert Astals Cid, on behalf of Volker Krause.
Committed on 11/09/2023 at 19:44.
Pushed by aacid into branch 'release/23.08'.

Fix creation of new JS objects

A default constructed QJSValue is undefined, not an object.
FIXED-IN: 23.08.1
(cherry picked from commit e41f682b3d1b1382aebda8c5575b53295ddf01df)

M  +1    -1    core/script/js_app.cpp
M  +1    -1    core/script/js_document.cpp
M  +1    -1    core/script/js_field.cpp

https://invent.kde.org/graphics/okular/-/commit/0f896f779d4969c7c1f04468faf197796cd712ad