标签:output add rgba 指定 input str pen rom 开始
from PyPDF2 import PdfFileWriter, PdfFileReader # 开始页 start_page = 0 # 截止页 end_page = 5 output = PdfFileWriter() pdf_file = PdfFileReader(open("3.pdf", "rb")) pdf_pages_len = pdf_file.getNumPages() # 保存input.pdf中的1-5页到output.pdf for i in range(start_page, end_page): output.addPage(pdf_file.getPage(i)) outputStream = open("output.pdf", "wb") output.write(outputStream)
转发自:https://www.jb51.net/article/149587.htm
标签:output add rgba 指定 input str pen rom 开始
原文地址:https://www.cnblogs.com/shunguo/p/14493201.html