使用pypdf2读取pdf元数据

时间:2019-07-10 10:13:44

标签: python python-3.x pdf metadata pypdf2

在提取pdf元数据时,我得到的答复是

pdfminer.six

我尝试了pypdf2和with open(path, 'rb') as f: pdf = PdfFileReader(f) info = pdf.getDocumentInfo()

{'/Title': IndirectObject(38, 0), '/Author': IndirectObject(40, 0), '/Subject': IndirectObject(41, 0), '/Producer': IndirectObject(39, 0), '/Creator': IndirectObject(42, 0), '/CreationDate': IndirectObject(43, 0), '/ModDate': IndirectObject(43, 0)}

得到回应:

pdfrw

因此from pdfrw import PdfReader >>> PdfReader(<filename>).Info 尝试了

{{1}}

0 个答案:

没有答案