Closed Bug 1720179 Opened 3 years ago Closed 3 years ago

[XFA] PDFs with no dataset entry can't be saved

Categories

(Firefox :: PDF Viewer, defect, P1)

Desktop
All
defect

Tracking

()

VERIFIED FIXED
93 Branch
Tracking Status
firefox-esr78 --- disabled
firefox-esr91 --- fixed
firefox91 --- disabled
firefox92 --- disabled
firefox93 --- verified
firefox94 --- verified

People

(Reporter: danibodea, Assigned: calixte)

References

Details

Attachments

(3 files)

Attached file evince-1157-0-GOOD.pdf

Note

  • When the user loads a specific PDF file in the browser and focuses a field, he will notice that the browser will not show the corresponding message as Adobe Reader does.

Affected versions

  • Nightly v91.0a1

Affected platforms

  • all

Steps to reproduce

  1. Launch browser.
  2. Flip "pdfjs.enableXfa" to true.
  3. Load the attached PDF file.
  4. Focus a field.

Expected result

  • A message is displayed.

Actual result

  • No message is displayed.

Regression range

  • Not a regression.

Additional information

  • When interacting with any control from the PDF form, Adobe Reader shows a message saying "Please Note: You cannot save a completed copy of this for your computer. If you would like a copy for your records, please fill it in and print it."
See Also: → 1720182

We need to get some input from UX for this bug. A workaround exists as the user can print the form.

Priority: -- → P2
QA Whiteboard: [pdf_xfa_generic]
See Also: → 1726346

The pdf doesn't contain a datasets entry in the /XFA array so it's likely why we can't save anything.
In the current state, it's impossible to workaround this because when saving we're doing an incremental update which means that we can overwrite objects that are used through a reference and here the /XFA array is not a reference so we cannot overwrite it to add a datasets entry.
So the only way to save it is to print it, it's even possible to print it using a pdf printer but in this case the resulting pdf will lose the form stuff.

:RT what do you think about adding a bar similar to the Acrobat one as described in comment 0 ?

Flags: needinfo?(rtestard)

(In reply to Calixte Denizet (:calixte) from comment #2)

The pdf doesn't contain a datasets entry in the /XFA array so it's likely why we can't save anything.
In the current state, it's impossible to workaround this because when saving we're doing an incremental update which means that we can overwrite objects that are used through a reference and here the /XFA array is not a reference so we cannot overwrite it to add a datasets entry.

Couldn't we overwrite the parent AcroForm[48 0 R] and replace XFA with our own new object?

:bdahl, that's correct I'll do that.
:RT, for now we've a workaround so please forget my question.

Assignee: nobody → cdenizet
Status: NEW → ASSIGNED
Flags: needinfo?(rtestard)
Priority: P2 → P1
Commit merged into master by GitHub
Authored by Brendan Dahl (brendandahl)
Depends on: 1729049
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Summary: [XFA] A message is not shown when entering a field → [XFA] PDFs with no dataset entry can't be saved

Considering the change of title, I assume that the fix for this issue will be to allow saving instead of showing the warning messages that Adobe does show. This being said, I have verified that saving works fine. Let me know if you need another bug for the notification/warning messages that still aren't shown. Thanks!

Status: RESOLVED → VERIFIED
Flags: needinfo?(cdenizet)

:danibodea, we already have a bug for the forms which cannot be saved.

Flags: needinfo?(cdenizet)
Depends on: 1741445
Target Milestone: --- → 94 Branch
Target Milestone: 94 Branch → 93 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: