Fillable PDF fields are no longer fillable after saving

Created on 15 October 2024, 2 months ago

Problem/Motivation

I have a site where if I upload a fillable PDF to my site, the PDF's fields are no longer fillable. If I uninstall this module, the fillable-ness of the PDF is maintained.

Steps to reproduce

- Add a PDF file via Content -> Media -> Add Media -> Document
- Attach a PDF that has fillable fields
- After the PDF file is attached to the Document, but before saving, click the PDF to view it
- The fillable fields are highlighted in light blue and can be typed into
- Save the document
- Reopen the document
- Click the PDF link to open it - the file is now flat and no fields can be typed into any more

- Uninstall PDF Metadata module
- Run all of the above steps again
- PDF is now still fillable after saving the Document

There are no errors showing in the system log.

I'll uninstall the module in the short term, but we would prefer to be able to use it.

Proposed resolution

I don't know enough about what's going on under the hood to propose a resolution. Thanks in advance to any who can offer a solution!

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States asigrist

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @asigrist
  • πŸ‡ΊπŸ‡ΈUnited States j-barnes

    @asigrist - Thanks for the breakdown. We are facing the same issues on some of our forms that leverage "Acrobat's Extended" version. Ghostscript actually regenerates the PDF file, but also flattens it -- which results fillable forms being in a printed state.

    Originally, we leveraged ExifTool with a PHP wrapper. This allowed us to not have to regenerate the entire PDF, but rather only modify the metadata. At the time, the library was not being maintained (so we switched over to Ghostscript) -- but it looks like it is now so it might be a good opportunity make this module a bit more generic and allow multiple providers.

    I think we can solve this but implementing the below:

    1. Introduce generic providers.
    2. Add back Exiftool with ability to toggle between providers.
  • πŸ‡ΊπŸ‡ΈUnited States asigrist

    Thanks for the very speedy reply and willingness to fix!

  • πŸ‡ΊπŸ‡ΈUnited States j-barnes
  • πŸ‡ΊπŸ‡ΈUnited States j-barnes

    Unassigning myself for now due to higher priority tickets, will revisit soon.

Production build 0.71.5 2024