Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reading/writing xmp metadatas on pdf files through pypdf

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?

like image 341
Giancarlo Avatar asked Jan 21 '09 19:01

Giancarlo


1 Answers

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.

like image 168
kylebrooks Avatar answered Oct 18 '22 06:10

kylebrooks