From c471c8ec53ddfba8eb620f97a4c9a34ccaff655c Mon Sep 17 00:00:00 2001 From: Harsh Agrawal Date: Wed, 3 Aug 2022 00:39:06 +0530 Subject: [PATCH] Use frontpage.pdf instead of a hardcoded one --- app/generate_single_personal_yb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/generate_single_personal_yb.py b/app/generate_single_personal_yb.py index 15811fc..4eb5a9e 100644 --- a/app/generate_single_personal_yb.py +++ b/app/generate_single_personal_yb.py @@ -271,8 +271,9 @@ def createWordCloud(student): ########################################## # merge pdfs -FRONT_PAGE = "myapp/static/myapp/pdf/Yearbook21GTA.pdf" +# FRONT_PAGE = "myapp/static/myapp/pdf/Yearbook21GTA.pdf" ROOT_DIR = "media/collage_and_yearbook_personal/" +FRONT_PAGE = os.path.join(ROOT_DIR, 'frontpage.pdf') current_dir = str(student.user) student_name = current_dir @@ -280,7 +281,6 @@ def createWordCloud(student): yearbook_pdf = os.path.join(current_dir, 'yearbook.pdf') collage_dir = os.path.join(current_dir, 'collages') collage_pdfs = os.listdir(collage_dir) -# frontpage_pdf = os.path.join(ROOT_DIR, 'frontpage.pdf') a4inpt = (img2pdf.mm_to_pt(210),img2pdf.mm_to_pt(297)) # specify page size (A4) layout_fun = img2pdf.get_layout_fun(a4inpt)