我正在使用这个脚本合并帐单文件,以便我可以打印一个文件。账单是3页,所以我需要在每个文件之后插入一个空白页,这样下一张账单的第一页就不会打印在上一张账单的背面。如何在每个票据文件的循环每次迭代后插入一个空白页?# If the file errors with "no module PyPDF2" then from command line, run pip install PyPDF2
import osfrom os imp
这是对的重写,但我尝试使用PdfFileWriter附加方法:cloneDocumentFromReader()和addBlankPage(),因为这样看起来更干净。我需要在PDF的末尾添加一个空白页,如果它包含奇数页,但是页面数大于1。所以我试着这样做:with open(pdffile, 'rb') as input:代码可以工作,但是创建的PDF</e
我使用的是PDF,但它只是覆盖了空白页面,不会附加到PyPDF2文件的末尾。这是我的代码。#this is the file i'm creatingfile1.drawStringcode i want to append blank page at the end but it overwrites with open(&
我需要将几个3页的票据文件合并到一个文件中,以便打印,同时在每个票据文件之间添加一个空白页,以便每个账单正确打印(我们不希望在上一张账单的背面打印一张钞票的第一页)。# If the file errors with "no module PyPDF2" then from command line, run pip install PyPDF2from os.path import