Brief tutorial on exporting a Google Colab Notebook to a PDF File using nbconvert. The video goes through two methods: exporting to HTML then to PDF format and exporting directly to PDF format. The code for each can be found below.
Method 1:
!jupyter nbconvert –to html /content/KNN.ipynb
Method 2:
!sudo apt-get install texlive-xetex texlive-fonts-recommended texlive-plain-generic
!jupyter nbconvert –to pdf /content/KNN.ipynb
The notebook can be found in the “Google Colab Tutorials” folder within the below repo.
GitHub Repo –
CONNECT:
LinkedIn:
GitHub:
Twitter:
Odysee:
|-Video Chapters-|
0:00 – Intro
0:13 – Issue with printing notebook to PDF
0:46 – nbconvert package
1:07 – Uploading file to content folder
1:24 – Method 1: Converting the notebook to HTML then printing to PDF format
3:31 – Method 2: Directly converting the notebook to PDF format
5:33 – References…(read more)
Convert Word 2 PDF: Word to PDF Converter
Convert PowerPoint 2 PDF: PPT to PDF Converter
Convert Excel 2 PDF: Excel to PDF Converter
Convert an Image 2 PDF: Image to PDF Converter
Convert HTML 2 PDF: HTML to PDF Converter
More Tools: PDF Converter
Thank you! It's helpful!
Hi Adrian, I have some visuals also in my python file and they are excluded in the pdf while converting by the second method. Any possible way to add visuals also in PDF?
Most Helpful video
thank you
This is probably one of the best videos on Youtube!
Just what I was looking for – thanks so much!
Nice! Thank you!
<3
Is there any possibility to convert it to epub format? Thank you for sharing.
HOW CAN I DO THIS
it's so usefull
this tutorial really helped me, thank you!
I tried to follow all the steps, and it says nbconvert command is not found in my Google Colab
This is so awesome. I wish I had learned this years ago!
Thanks Adrian, but I am having some issues with Plotly graphs. Matplotlib ones are fine, but Plotly ones are not showing up in HTML.
This is amazing!!! My TA told me just print it which mess all my graphs
Great content. Any way to print without the code cells?
Thank you! It works very well. I was wondering if there's a way we can add the author and change the title or the date? I'm planning to submit my assignment using this method. So, if I can customize the title, it would be perfect.
How are you dragging and dropping the file?
Great video and explanation!
muchas gracias, calidad de video. thks for your great video.
Nice! Thanks!
Many thanks, Adrian. I really appreciate your explanation.
Thanks for sharing!