from PyPDF2 import PdfFileReader,PdfFileWriter 读pdf=PdfFileReader(r'E:\pdf\python.pdf') for i in range(读pdf.getNumPages()): 写pdf=PdfFileWriter() 写pdf.addPage(读pdf.getPage(i)) with open('E:\pdf\{}.pdf'.format(i+1),'wb') as f: 写pdf.write(f)
from PyPDF2 import PdfFileReader,PdfFileWriter 读pdf=PdfFileReader(r'E:\pdf\python.pdf') for i in range(读pdf.getNumPages()): 写pdf=PdfFileWriter() 写pdf.addPage(读pdf.getPage(i)) with open('E:\pdf\{}.pdf'.format(i+1),'wb') as f: 写pdf.write(f)