mozilla / pdf.js

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

Field method "buttonGetIcon" not working #18230

Open agrahn opened 3 months ago

agrahn commented 3 months ago

Attach (recommended) or Link to PDF file here:

buttonGetIcon.pdf

Configuration:

Steps to reproduce the problem:

  1. Open the attached PDF in the browser and click into the rectangle
  2. The rectangle contains a pushbutton with a JavaScript action. The JavaScript tries to retrieve the normal (not rollover or down) appearance of another, hidden pushbutton, using buttonGetIcon(), and then to set the normal appearance of the clicked pushbutton using buttonSetIcon(...). However, the clicked pushbutton does not display anything. For debugging purposes, the value returned from buttonGetIcon() is printed to the console which is null.

What is the expected behavior? (Acrobat Reader)

iconAR-2


What went wrong ? (Firefox/pdf.js)

iconFF

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):