add empty pages for evenness

This commit is contained in:
dickreckard 2022-12-15 00:54:55 +01:00
parent 1542eae5e0
commit 72a39434e8

View File

@ -135,7 +135,12 @@ for chapter in chapters:
outputs.append(localhost+pdffile)
counter+=1
page=page+pypdftk.get_num_pages(localhost+pdffile)
pagenr=pypdftk.get_num_pages(localhost+pdffile)
if (pagenr % 2) != 0:
pypdftk.concat([localhost+pdffile,localhost+'blank.pdf'],localhost+'temp.pdf')
os.replace(localhost+'temp.pdf',localhost+pdffile)
pagenr+=1
page=page+pagenr
# compiling all the files in one big pdf!