Skip to content
Snippets Groups Projects
Commit 85a6bc76 authored by Richard's avatar Richard
Browse files

look at page size

parent c26212b1
No related branches found
No related tags found
1 merge request!8Add QR codes to odd pages
Pipeline #17812 passed
......@@ -342,9 +342,11 @@ def make_pages_even(output_filename, exam_pdf_file):
new = PdfWriter()
new.addpages(exam_pdf.pages)
pagecount = len(exam_pdf.pages)
if (pagecount % 2 == 1):
blank = PageMerge()
blank.mbox = [0, 0, 595.276, 841.89] # A4
box = exam_pdf.pages[0].MediaBox
blank.mbox = box
blank = blank.render()
new.addpage(blank)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment