for pageNumber,page in enumerate(PDFDocument.get_pages()): if pageNumber == 42: #do something with the page
有一篇非常好的文章here.