Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -158,8 +158,14 @@ if (summ_text is not None) or ('summ_text' in st.session_state):
|
|
158 |
body {
|
159 |
font-family: sans-serif;
|
160 |
background-color: grey; /* Set background color to grey */
|
161 |
-
color: white; /* Set font color to white */
|
162 |
margin: 0; /* Remove body margin */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
}
|
164 |
.page {
|
165 |
font-size: 16pt; /* Adjust the font size as needed */
|
@@ -190,12 +196,13 @@ if (summ_text is not None) or ('summ_text' in st.session_state):
|
|
190 |
<body>
|
191 |
'''
|
192 |
for i, page in enumerate(html_pages):
|
193 |
-
combined_html += f'<div class="page">{page}</div>'
|
194 |
if i < len(html_pages) - 1: # Only add page break if it's not the last page
|
195 |
combined_html += '<div style="page-break-after: always;"></div>'
|
196 |
combined_html += '</body></html>'
|
197 |
|
198 |
return combined_html
|
|
|
199 |
html_content = create_pdf_from_markdown_strings(st.session_state.summ_text)
|
200 |
pdf_file = generate_pdf(html_content)
|
201 |
|
|
|
158 |
body {
|
159 |
font-family: sans-serif;
|
160 |
background-color: grey; /* Set background color to grey */
|
|
|
161 |
margin: 0; /* Remove body margin */
|
162 |
+
padding: 0; /* Remove body padding */
|
163 |
+
}
|
164 |
+
.content {
|
165 |
+
background-color: grey; /* Ensure the background color spans the full page */
|
166 |
+
color: white; /* Set font color to white */
|
167 |
+
padding: 20mm; /* Set padding to create text margins */
|
168 |
+
box-sizing: border-box; /* Include padding in the element's total width and height */
|
169 |
}
|
170 |
.page {
|
171 |
font-size: 16pt; /* Adjust the font size as needed */
|
|
|
196 |
<body>
|
197 |
'''
|
198 |
for i, page in enumerate(html_pages):
|
199 |
+
combined_html += f'<div class="content"><div class="page">{page}</div></div>'
|
200 |
if i < len(html_pages) - 1: # Only add page break if it's not the last page
|
201 |
combined_html += '<div style="page-break-after: always;"></div>'
|
202 |
combined_html += '</body></html>'
|
203 |
|
204 |
return combined_html
|
205 |
+
|
206 |
html_content = create_pdf_from_markdown_strings(st.session_state.summ_text)
|
207 |
pdf_file = generate_pdf(html_content)
|
208 |
|