reading/writing xmp metadatas on pdf files through

2019-06-22 12:36发布

问题:

I can read xmp metadatas through pyPdf with this code:

a = pyPdf.PdfFileReader(open(self.fileName))
b = a.getXmpMetadata()                      
c = b.pdf_keywords 

but: is this the best way?

And if I don't use the pdf_keywords property?

And is there any way to set these metadatas with pyPdf?

回答1:

As far as I can see, this is the best way to do so - and there is no way to change the metadata with pyPDF.