Problem/Motivation
Currently in the generatePdfWithMetadata we always unset Title, Author, Subject, and Keywords for legacy metadata. We then always add the new metadata tag with the newer format. Instead, if the meta tag already exists let's just set that, otherwise we can add a new tag.
We also need to fix the keywords to use a Multi field because they correctly don't show up in Adobe Acrobat (but shows up fine in the chrome reader).
Steps to reproduce
- Setup PDF Metadata as enable on a media entity.
- Make sure the keywords attribute has a token setup for it.
- Save, and open the PDF in acrobat. There should be no keywords.
Proposed resolution
Refactor the code and set legacy metadata if available, otherwise we add. Then if we edit the PDF again it should always use the previous tag that was added prior.
Issue fork pdf_metadata-3301331
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
j-barnes commentedComment #4
sunny-lee commentedTested and reviewed, PDFs are generated with metadata and works with Adobe.
Comment #5
sunny-lee commentedTested and reviewed, PDF added to Drupal adds correct metadata tags
Comment #8
j-barnes commentedComment #9
j-barnes commentedComment #10
j-barnes commented