pymupdf/PyMuPDF

custom metadata keys

Closed this issue · 1 comments

Hi,
It would be nice to have option to add custom metadata keys to Document as following:

import fitz

doc = fitz.open(input path)
doc.set_metadata({
    "url": custom_url,
    "category": "article"
})

Right now, there are just following keys avalilable: /Creator, /Producer, /CreationDate, /ModDate, /Title, /Author, /Subject, /Trapped and /Keywords respectively.
https://pymupdf.readthedocs.io/en/latest/document.html#Document.metadata