Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recent commit makes some PDF files with forms appear blank #15557

Closed
plorb opened this issue Oct 10, 2022 · 1 comment · Fixed by #15558
Closed

recent commit makes some PDF files with forms appear blank #15557

plorb opened this issue Oct 10, 2022 · 1 comment · Fixed by #15558

Comments

@plorb
Copy link

plorb commented Oct 10, 2022

Attach (recommended) or Link to PDF file here:
checkbox-incomplete-appearance.pdf

Configuration:

  • Web browser and its version: Firefox 105.0.1
  • Operating system and its version: Windows and Linux
  • PDF.js version: all since commit 0c31320

Steps to reproduce the problem:
Open a PDF with a checkbox annotation that doesn't completely specify the appearance.

What is the expected behavior?
Text and other content is visible. In this example, "Check Box" should be visible.

What went wrong?
The page appears blank except for the form entry boxes.

Commit 0c31320 entered the Firefox release recently and broke an old PDF form. The form has some checkbox appearance issue that causes appearance .dict vars to not be set and throw an exception when pdf.js tries to use them. I created a smaller file with the same issue. Previously the PDF displayed properly anyway. This commit changed the data structure returned by the annotation getOperatorList but missed a null return in a catch block for opListPromises. The null value isn't tolerated anymore. This can be fixed by returning the empty list structure instead of null. Then the PDF works again.

@marco-c
Copy link
Contributor

marco-c commented Oct 10, 2022

Filed https://bugzilla.mozilla.org/show_bug.cgi?id=1794351 to track the regression on Bugzilla.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants