Browse Source

add empty pages for evenness

master
dickreckard 1 year ago
parent
commit
72a39434e8
  1. 7
      pdf-compile.py

7
pdf-compile.py

@ -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!

Loading…
Cancel
Save