I want to print my jupyter notebook and share the hardcopy with non-programmer coworkers.
What I have done so far:
My question: How to put a page break to specify the contents on each pdf page?
Once I convert the slides(html) to pdf, the text and graph is not at the expected location in pdf. I want the graph and the text explaining the graph to be in the same page. Do I need to put some page breaks in markdown cell of my Jupyter notebook? Or how to specify the content on each page of pdf, instead of letting the browser decide
Also, I'm trying to convert Jupyter notebok directly to pdf, but encounters issues: Convert jupyter notebook to pdf: Error encounters when install pandoc
I found several places which mentioned including HTML code for the page break in a markdown cell. I got this to work, but only by:
<p style="page-break-after:always;"></p>
jupyter nbconvert --to html YourNotebook.ipynb
save as PDF
.I tried other methods such as print when viewing the .ipynb
file or using nbconvert
to go straight to PDF, but none of that worked. Exporting to HTML and then opening the html and saving as PDF did work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With