From: Jan Szejko Date: Mon, 14 Mar 2016 16:54:31 +0000 (+0100) Subject: images in PDF X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/6861512e712b1f573102b6114177d0e156f7c160?ds=inline images in PDF --- diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index af2efe23..d93a8c49 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -259,7 +259,7 @@ def book_pdf(request, slug): # TODO: move to celery doc = book.wldocument() # TODO: error handling - pdf_file = doc.as_pdf() + pdf_file = doc.as_pdf(cover=True, ilustr_path=os.path.join(settings.MEDIA_ROOT, settings.IMAGE_DIR, book.gallery)) from catalogue.ebook_utils import serve_file return serve_file(pdf_file.get_filename(), book.slug + '.pdf', 'application/pdf')