|
- from PyPDF2 import PdfFileReader, PdfFileWriter
- 读PDF = PdfFileReader("c:/合并后的.pdf")
- 写PDF = PdfFileWriter()
- for page in range(读PDF.getNumPages()-1, -1, -1):
- # print(page)
- 写PDF.addPage(读PDF.getPage(page))
- with open("c:/倒序.pdf", "wb") as 变量名:
- 写PDF.write(变量名)
复制代码
|
|