我试图使用pyPdf从大pdf中提取几页到单独的文件。每当我这样做,结果文件大小几乎与源文件相同。我认为它与文件内的书签有关,因为如果页面不包含任何链接,则输出文件的大小非常小。我无法弄清楚如何从输出文件中排除书签。 from pyPdf import PdfFileWriter as writer, PdfFileReader as reader
w = writer()
r = reade
我遇到一些问题,我用一个小程序编辑了使用pyPdf编辑PDF。我试图到PDF(self.lastpage)作为默认参数的最后一页传递到一个类的方法(pageoutput)当我这样做,我收到以下错误: Traceback (most recent call last):
File "C:\Census\sf1.py", line 5, in <module>
class PdfG
from pyPdf import PdfFileReader
f = open('document.pdf', 'rb')
p = PdfFileReader(f)
o = p.getOutlines()
List对象o包括字典的对象pyPdf.pdf.Destination(书签),其中有许多属性,但我找不到任何引用的页面数量书签 我怎样才能返回页数,比方说o[1]书签? 例如o[1