move watermark to the back please

This commit is contained in:
Thomas Steen Rasmussen 2016-05-30 23:37:32 +02:00
parent 65bb088095
commit ac5f31ef93

View file

@ -29,9 +29,9 @@ def generate_pdf_letter(filename, template, formatdict):
### add the watermark to all pages
for pagenum in xrange(pdfreader.getNumPages()):
page = pdfreader.getPage(pagenum)
page = watermark.getPage(0)
try:
page.mergePage(watermark.getPage(0))
page.mergePage(pdfreader.getPage(pagenum))
except ValueError:
### watermark pdf might be broken?
return False