mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
47.09k stars 9.81k forks source link

Widget Annotation: PageOpen (/PO) and PageClose (/PC) events are not reacted upon #18305

Closed agrahn closed 2 days ago

agrahn commented 1 week ago

Attach (recommended) or Link to PDF file here: triggers.pdf

Configuration:

Steps to reproduce the problem:

  1. Open the attached two-page PDF. On the second page, there is a pushbutton that, within its AA (AdditionalActions) dictionary, defines actions for the PageOpen/PageClose (/PO and /PC entries) and for the MouseDown/MouseUp (/D and /U entries) trigger events. As actions, appropriate debug messages are written into the browser console.
  2. When scrolling forth and back to and from the page with the Widget Annotation, the expected debug messages PageOpen and PageClose should be printed into the console.

What is the expected behavior?

When scrolling forth and back in the 2-page document, corresponding debug messages should appear in the browser console.

What went wrong?

Nothing happens when scrolling between the document pages. Thus, PageOpen and PageClose do not trigger the associated actions. Only mouse interaction with the Widget Annotation is functional, MouseDown and MouseUp events are reacted upon and corresponding debug messages appear in the browser console.