Skip to content

Fix capitalization in info:ModDate - #150

Merged
gen2brain merged 1 commit into
gen2brain:masterfrom
RonSkons:fix-moddate
Jun 22, 2026
Merged

Fix capitalization in info:ModDate#150
gen2brain merged 1 commit into
gen2brain:masterfrom
RonSkons:fix-moddate

Conversation

@RonSkons

Copy link
Copy Markdown

When extracting PDF metadata using Document.Metadata(), data["modDate"] is always empty.

This is caused by the following line:

data["modDate"] = lookup("info:modDate")

modDate (with a lowercase m) is not recognized by fitz as a valid metadata field.
The correct lookup is:

data["modDate"] = lookup("info:ModDate")

This lines up with FZ_META_INFO_MODIFICATIONDATE, and makes Document.Metadata() return the expected results.

@gen2brain
gen2brain merged commit c01169a into gen2brain:master Jun 22, 2026
2 checks passed
@gen2brain

Copy link
Copy Markdown
Owner

Merged, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants