mozilla / pdf.js

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

XFA can't access property "find", fontFinder is undefined #13647

Open JDziurlaj opened 3 years ago

JDziurlaj commented 3 years ago

Attach (recommended) or Link to PDF file here: E-Ticket.pdf Configuration:

Steps to reproduce the problem:

  1. enableXfa = true
  2. Open form

What is the expected behavior? (add screenshot) PDF renders. image

What went wrong? (add screenshot) Console error: Warning: XFA - an error occured during layout: TypeError: can't access property "find", fontFinder is undefined

marco-c commented 3 years ago

This is now working. With mozregression, I found it was fixed in Firefox by the update in https://bugzilla.mozilla.org/show_bug.cgi?id=1727189.

Snuffleupagus commented 3 years ago

This is now working.

Not really, given that this is a XFA Foreground document and those were (temporarily) disabled in PR #13660 since we don't support them yet. Hence this will be broken if/when we implement support for XFAF documents, so I'm re-opening this issue :-)


A simple way to tell, indirectly, for now if a document is a XFAF one is by checking the web console. If there's a Warning: XFA support is not enabled line printed despite the preference being set to enableXFA = true then it's a XFAF document.

marco-c commented 3 years ago

Ahah, you're right, I hadn't noticed that I can't edit the form!