开发者

Is there Python PDF metadata writing library for Windows?

开发者 https://www.devze.com 2023-01-22 04:25 出处:网络
Can someone point me to Python PDF pac开发者_Go百科kage that can do metadata writing? I found Python XMP Toolkit, but building Exempi on cygwin is nightmare I want to avoid.You can modify pdf docinfo

Can someone point me to Python PDF pac开发者_Go百科kage that can do metadata writing? I found Python XMP Toolkit, but building Exempi on cygwin is nightmare I want to avoid.


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.


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/

0

精彩评论

暂无评论...
验证码 换一张
取 消