smalot / pdfparser

PdfParser, a standalone PHP library, provides various tools to extract data from a PDF file.
GNU Lesser General Public License v3.0
2.41k stars 537 forks source link

Merge XMP Metadata if dc:format tag not found #722

Closed GreyWyvern closed 4 months ago

GreyWyvern commented 5 months ago

Type of pull request

About

Previously extractXMPMetadata() would check for the existence of a dc:format tag with an application/pdf MIME-type value before allowing found XMP metadata to be merged with the other document details.

If the tag doesn't exist, merge the metadata anyway. If it does exist, only then check to see if it has the application/pdf MIME-type. Resolves #721.

Checklist for code / configuration changes

In case you changed the code/configuration, please read each of the following checkboxes as they contain valuable information: