From 6861512e712b1f573102b6114177d0e156f7c160 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Mon, 14 Mar 2016 17:54:31 +0100 Subject: [PATCH 1/1] images in PDF --- apps/catalogue/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') -- 2.20.1