Skip to content
Snippets Groups Projects
Unverified Commit fca799b4 authored by AakashGC's avatar AakashGC Committed by GitHub
Browse files

:bug: FIX: Export Notebook as HTML with no page-breaks (#903)

parent a0109e54
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,22 @@ async def _html_to_pdf(html_file, pdf_file):
# Give it *some* margins to make it look a little prettier
# I just made these up
page_margins = {"left": "0in", "right": "0in", "top": ".5in", "bottom": ".5in"}
await page.addStyleTag(
{
"content": """
div.cell_input {
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
}
div.cell_output {
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
}
"""
}
)
await page.pdf({"path": pdf_file, "margin": page_margins})
await browser.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment