Can someone point me to Python PDF package that can do metadata writing? I found Python XMP Toolkit, but building Exempi on cygwin is nightmare I want to avoid.
Asked
Active
Viewed 2,186 times
2 Answers
3
You can modify pdf docinfo metadata, (not xmp metadata) in either of the following ways:
- pdfrw seems to have some support for this (not a lot of documentation, but looking at the alter.py example, it seems to be possible).
- This SO question uses pyPdf library to make a new pdf with the desired metadata: Change metadata of pdf file with pypdf.
Alternatively, you could wrap a command line application like pdftk.
-
Thanks for your answer :) Tiny pdfrw package is perfect solution to my metadata problem – romor Oct 28 '10 at 14:11
-
Pdftk is also docinfo only, not xmp. – Matthew Leingang Sep 08 '12 at 13:14
0
You might want to get a command line to modify metadata. Some tools modify both native and XMP metadata.
I wrote a blog on metadata editing a while ago: http://www.barcodeschool.com/2010/09/publishers-fix-the-metadata-in-the-pdf-file/

cuteCAT
- 2,251
- 4
- 25
- 30