【发布时间】:2023-02-19 20:00:40
【问题描述】:
使用 Py2PDF 库查找 PDF 中的总页数的确切代码是什么? .numPages 的旧方法已弃用
【问题讨论】:
标签: python python-3.x pdf
使用 Py2PDF 库查找 PDF 中的总页数的确切代码是什么? .numPages 的旧方法已弃用
【问题讨论】:
标签: python python-3.x pdf
使用.pages方法
from PyPDF2 import PdfReader
reader = PdfReader("US_Declaration.pdf")
readpdf = len(reader.pages)
【讨论】: