📜  pypdf2 高级教程 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:10.052000             🧑  作者: Mango

代码示例1
import PyPDF2

with open('Python_Tutorial.pdf', 'rb') as pdf_file:
    pdf_reader = PyPDF2.PdfFileReader(pdf_file)
    print(f'Number of Pages in PDF File is {pdf_reader.getNumPages()}')
    print(f'PDF Metadata is {pdf_reader.documentInfo}')
    print(f'PDF File Author is {pdf_reader.documentInfo["/Author"]}')
    print(f'PDF File Creator is {pdf_reader.documentInfo["/Creator"]}')