Saving PDF with modified form data not persisting form data
Categories
(Firefox :: PDF Viewer, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | verified |
People
(Reporter: bdahl, Assigned: bdahl)
References
Details
Attachments
(1 file, 1 obsolete file)
STR:
- Open PDF with form e.g. (https://www.irs.gov/pub/irs-pdf/f1040.pdf)
- Fill out some form fields
- Save the PDF (either ctrl/cmd+s or File->Save Page As)
- Close PDF
- Open saved file
Expected:
PDF has modified form data
Actual:
PDF form data is empty
Assignee | ||
Comment 1•4 years ago
|
||
I should note that if you click PDF.js's "Download" button the PDF produced works as expected.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Now when Ctrl/Cmd+S or "Save Page As" is used, Firefox will send PDF.js a
message to trigger downloading. This allows PDF.js to generate a new PDF
if there is modified form data that needs to be saved or send back the
unmodified data. Once PDF.js has generated the blob it will send messages
to the PdfjsParent to open the "Save As" dialog.
Adds two tests:
- Saving a plain PDF without forms.
- Saving a PDF with modified forms and verifies the new PDF has the form
data.
Depends on D87674
Assignee | ||
Comment 4•4 years ago
|
||
Do either of you have thoughts on which behavior we want from the download button in pdf.js (save as or open with)?
More context:
The test browser_download_open_with_internal_handler.js
is failing after these changes. It looks like we expect the "open with" dialog to be triggered from the pdf.js download button, where as with these changes the "save as" dialog is opened. IIIRC, the open with dialog was used at the time because there wasn't an easy way to trigger the "save as" dialog. I think the "save as" dialog makes more sense now that we're able to enter form data and save it.
Comment 6•4 years ago
|
||
I agree that the "save as" dialog makes more sense here. I do want to flag up that some of the flows around opening PDFs in external apps described in the comments in bug 1653807 become harder when we do this, so I wonder if we can come up with a lightweight way of fixing that... still, that doesn't need to happen in this bug.
Updated•4 years ago
|
Comment 8•4 years ago
|
||
bugherder |
Comment 9•4 years ago
|
||
Verified with 81.0b4 on Windows 10, macOS 10.15, Ubuntu 18.
Updated•2 years ago
|
Description
•