-# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
#
from errno import ENOENT
import os
texml = BytesIO(rendered.encode('utf-8'))
tempdir = mkdtemp(prefix="render_to_pdf-")
tex_path = os.path.join(tempdir, "doc.tex")
- with open(tex_path, 'w') as tex_file:
+ with open(tex_path, 'wb') as tex_file:
Texml.processor.process(texml, tex_file, encoding="utf-8")
if add_files: