question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Complex XFA forms fail to render properly (or at all), with XFA enabled.

See original GitHub issue

Attach (recommended) or Link to PDF file here:

Market Authorisation Application form from the European Medicines Agency.

The screenshots and attached file is a “variation form” that is a bit smaller (and easier to fill out).

Filled out version of the variation form.

Configuration:

  • Web browser and its version:
Google Chrome | 91.0.4472.77 (Officiell version) (64 bitar) (cohort: Stable)
Version | 1cecd5c8a856bc2a5adda436e7b84d8d21b339b6-refs/branch-heads/4472@{#1246}
  • Operating system and its version: Windows 10 (1909)
  • PDF.js version: Online demo version + tested with a local build from master today.

Steps to reproduce the problem:

  1. enableXfa = true
  2. load the PDF

What is the expected behavior? (add screenshot)

The expected behavior is what Adobe Reader renders, or at least something similar. I am aware that XFA support is still experimental, at best.

image

What went wrong? (add screenshot)

Some parts render OK, but the more complex parts look really strange.

image

There are also lots of warnings like this in the console:

Warning: XFA - Invalid reference: $record.envelope.lists.eeaCountriesExcludingUkNi.item[*].
Warning: XFA - Invalid reference: $record.envelope.lists.eeaCountries.item[*].
Warning: XFA - Invalid reference: $record.envelope.lists.countries.item[*].

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

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
marco-ccommented, Jul 8, 2021

@sictransit let’s keep this open to track rendering this form as it is supposed to be rendered (it is a pretty complex one!)

0reactions
sictransitcommented, Oct 28, 2021

The latest pre-release (https://github.com/mozilla/pdf.js/releases/tag/v2.11.338) certainly does a much better job. All the information is there, except for scanned signatures.

Issues I’ve noticed:

  • Disabled sections are still shown, leading to lots of pages with blank form fields. Compare filled out example form with Adobe’s rendering.
  • Page numbering is not working.
  • Chained parts of the form, e.g. with boxes within other boxes, are not rendered properly. Sorry for lack of proper terminology.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Display issues for XFA-based PDF forms and policy-protected ...
Check for the following reasons if you are not able to open an XFA-based PDF form or a policy-protected document using Adobe LiveCycle ......
Read more >
mozilla/pdf.js - Support XML Forms Architecture (XFA) forms
XFA forms are XML-based forms created by Adobe's LiveCycle Designer tool. ... Two blue blocks in this PDF fail to render #2811.
Read more >
How to fill XFA form using iText without breaking usage rights?
I assume I need to flatten a XFA form in order to display properly on the UI of an application that uses Nuance's...
Read more >
PDFs with XFA forms processing workflow
Thank you for your post and your response. XFA PDFs are not a supported file so processing it is difficult. One workaround for...
Read more >
Newest 'xfa' Questions - Stack Overflow
XFA stands for XML Forms Architecture, a family of proprietary XML ... developed a form in LiveCycle ES4 which I then make an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found