diff --git a/cara/apps/calculator/static/css/report.css b/cara/apps/calculator/static/css/report.css index f35a6940..3611207b 100644 --- a/cara/apps/calculator/static/css/report.css +++ b/cara/apps/calculator/static/css/report.css @@ -103,8 +103,14 @@ p.notes { .break-avoid { page-break-inside: avoid; } + #results-div { + min-height: 875px; + } + .first_page { + height: 380pt; + } .second_page { - height: 530pt; + height: 420pt; } .third_page { height: 90pt; diff --git a/cara/apps/calculator/static/js/pdf.js b/cara/apps/calculator/static/js/pdf.js index 7432b62b..b49d6959 100644 --- a/cara/apps/calculator/static/js/pdf.js +++ b/cara/apps/calculator/static/js/pdf.js @@ -1,11 +1,6 @@ function execute_me(qr_link) { const pdf_version = this.document.getElementById("body"); - // Set height of first page break according to the results div - const header_height = this.document.getElementById("report-header-div").offsetHeight; - const results_height = this.document.getElementById("results-div").offsetHeight; - this.document.getElementById("break-first-page").style.height = (1420 - header_height - results_height) + 'pt'; - // PDF styling var opt = { filename: 'myfile.pdf', diff --git a/cara/apps/calculator/templates/base/calculator.report.html.j2 b/cara/apps/calculator/templates/base/calculator.report.html.j2 index d4342934..57f949a3 100644 --- a/cara/apps/calculator/templates/base/calculator.report.html.j2 +++ b/cara/apps/calculator/templates/base/calculator.report.html.j2 @@ -88,8 +88,8 @@ -
-
+
+
Alternative scenarios
-
- - +
+ + {% block report_scenarios_summary_table %}