Converting Code Notebooks to PDF#
Using Colab#
If you are running your notebook in Colab:
Go to
File > Print.Download the notebook as a PDF from your browser.
Using a Notebook in a Text Editor (e.g., VSCode)#
Make sure you have installed
nbconvertby running:pip install nbconvert
Convert your notebook to HTML:
jupyter nbconvert --to html <path to notebook>
Open the generated
.htmlfile in your browser.Go to
File > Printin your browser to download the notebook as a PDF.(Tip: Adjust the
More settings > Scaleoption as needed to ensure all cell content is visible.)