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

 

版权声明:本文为luckiness原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/luckiness/p/13305585.html