資源簡介
頁碼從0開始,即:如果想刪除第一頁,那么請輸入0 即可
代碼片段和文件信息
#A?simple?script?to?remove?extra?pages?from?a?PDF?doc.
#Requires?python3?and?PyPDF2
from?PyPDF2?import?PdfFileWriter?PdfFileReader
output?=?PdfFileWriter()
input1?=?PdfFileReader(open(r‘D:\BaiduNetdiskDownload\精品IT編程電子書\第A1期\《Hadoop大數據實戰權威指南》QQ群:1532276.pdf‘?“rb“))
#?print?how?many?pages?input1?has?because?why?not:
print?(“Input?has?%d?pages.“?%?input1.getNumPages())
print(“List?the?page?numbers?to
評論
共有 條評論