open in binary mode when saving files to archive
This commit is contained in:
parent
349cc325d7
commit
a4dd75e5c8
|
@ -39,7 +39,7 @@ def generate_pdf_letter(filename, template, formatdict):
|
||||||
finalpdf.addPage(page)
|
finalpdf.addPage(page)
|
||||||
|
|
||||||
### save the generated pdf to the archive
|
### save the generated pdf to the archive
|
||||||
with open(settings.PDF_ARCHIVE_PATH+filename, 'w') as fh:
|
with open(settings.PDF_ARCHIVE_PATH+filename, 'wb') as fh:
|
||||||
finalpdf.write(fh)
|
finalpdf.write(fh)
|
||||||
print('Saved pdf to archive: %s' % settings.PDF_ARCHIVE_PATH+filename)
|
print('Saved pdf to archive: %s' % settings.PDF_ARCHIVE_PATH+filename)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue