Read / write xmp metadata in pdf files via pypdf

I can read xmp metadata via pyPdf using this code:

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

but: is this the best way?

And if I do not use the pdf_keywords property?

And is there any way to set this metadata with pyPdf?

+5
source share
1 answer

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

+3
source

All Articles