blank pages
This commit is contained in:
parent
de61cfa258
commit
c72b18da39
1 changed files with 9 additions and 2 deletions
|
@ -260,6 +260,8 @@ def main():
|
||||||
# aggiungere copertina
|
# aggiungere copertina
|
||||||
pdfWriter.addPage(copertina(str(pagstart).zfill(3) + " - " + str(pagend).zfill(3)))
|
pdfWriter.addPage(copertina(str(pagstart).zfill(3) + " - " + str(pagend).zfill(3)))
|
||||||
|
|
||||||
|
pdfWriter.addBlankPage()
|
||||||
|
|
||||||
indtext = ""
|
indtext = ""
|
||||||
for vgo_num in [str(x).zfill(3) for x in range(pagstart, pagend + 1)]:
|
for vgo_num in [str(x).zfill(3) for x in range(pagstart, pagend + 1)]:
|
||||||
pdf_name = os.path.join('pdf', vgo_num + '.pdf')
|
pdf_name = os.path.join('pdf', vgo_num + '.pdf')
|
||||||
|
@ -274,15 +276,20 @@ def main():
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# aggiungere indice ed eventualmente pagina finale
|
pdfWriter.addBlankPage()
|
||||||
|
|
||||||
|
# aggiungere indice
|
||||||
for indpag in indice(indtext):
|
for indpag in indice(indtext):
|
||||||
pdfWriter.addPage(indpag)
|
pdfWriter.addPage(indpag)
|
||||||
|
|
||||||
|
#Aggiungere pagina finale
|
||||||
|
pdfWriter.addBlankPage()
|
||||||
|
|
||||||
book_name = os.path.join('books', 'book' + str(book_num).zfill(2) + '.pdf')
|
book_name = os.path.join('books', 'book' + str(book_num).zfill(2) + '.pdf')
|
||||||
with open(book_name, 'wb') as pdfOutput:
|
with open(book_name, 'wb') as pdfOutput:
|
||||||
pdfWriter.write(pdfOutput)
|
pdfWriter.write(pdfOutput)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in a new issue