通过pypdf在pdf文件上读取/写入xmp元数据 [英] reading/writing xmp metadatas on pdf files through pypdf

查看:378
本文介绍了通过pypdf在pdf文件上读取/写入xmp元数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用以下代码通过pyPdf读取xmp元数据:

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?

如果我不使用pdf_keywords属性?

And if I don't use the pdf_keywords property?

有什么方法可以使用pyPdf设置这些元数据吗?

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

推荐答案

据我所知,这是最好的方法-而且无法使用pyPDF更改元数据.

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.

这篇关于通过pypdf在pdf文件上读取/写入xmp元数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆