Thanks. Pycharm Professional makes it difficult to extract pdfs of jupyter notebook. I don't want to have to go back and forth to colab just to generate pdfs. I used the HTML method you described in this video and it worked perfectly. Thanks!
Thanks! This got rid of multiple issues for me when printing directly from Colab. - output cells with scroll bar get truncated. - missing pages/charts for long notebooks
If you do this :under File - Print -Click on it , from the printers ..select 'Microsoft Print to PDF' and then hit Print ..it will ask you the location where you want tosave this PDF and you just got your PDF ...you can print it later though. However this PDF will be balck and white and the code cells cannot be distinguished from the output cells when you print them ( like no color difference ) ...everything is just normal text
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?
Stack Overflow post that speaks about the issue: stackoverflow.com/questions/66210187/exporting-jupyter-notebook-with-plotly-to-html-not-displaying-correctly-when-off
Hey there, thanks for the video! In case someone is interested how to refer directly to a file residing on Google Drive, here is the command: from google.colab import drive drive.mount('./mount') !jupyter nbconvert --to html 'mount/My Drive/Colab Notebooks/NameOfFile.ipynb'
its giving this error: raise OSError( OSError: xelatex not found on PATH, if you have not installed xelatex you may need to do so. can someone help please?
@@nirbhay2417 What was the code snippet for the error? And did you run " !sudo apt-get install texlive-xetex texlive-fonts-recommended texlive-plain-generic" first?
@@AdrianDolinay It worked now.. I ran this extra command: !sudo apt-get update now its creating the pdf from nbconvert... Thanks a lot for your prompt response!!
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.
Hello! The GitHub thread below discusses this issues. Looks like the metadata needs to be edited. Hope this helps! github.com/jupyter/nbconvert/issues/249
Have an updated repo, see the link below. Hope it helps! github.com/ad17171717/RUclips-Tutorials/tree/main/Google%20Colab%20Tutorials/Exporting%20to%20a%20PDF%20Format
If you are having an issue with the drag and drop you can instead select the folder icon labeled "Files". In the top left under the "Files" title there is a paper icon with an arrow labeled "Upload to Session Storage". You can select that then upload your file. Hope this helps!
Hi, Pier Laurenzi, I couldn't find this either. Thanks to you and Adrian now I can. I highly recommend a Medium article with this. It is extremely useful!!!
You can clear the pip output with "Clear Cell" within Jupyter or Google Colab. If you want to get rid of the cell completely, delete the cell and save the notebook then you can reinsert the pip installs once you've converted it to a PDF
This is absolutely great! You started off by addressing the number 1 problem in printing directly from Colab. You helped me a lot! Thank you Adrian
Thanks. Pycharm Professional makes it difficult to extract pdfs of jupyter notebook. I don't want to have to go back and forth to colab just to generate pdfs. I used the HTML method you described in this video and it worked perfectly. Thanks!
Thanks!
This got rid of multiple issues for me when printing directly from Colab.
- output cells with scroll bar get truncated.
- missing pages/charts for long notebooks
😄thanks dude, I was trying to create it pdf but was just getting a pdf in black and white, now I can make pdf in a great coloured quality....🙏
Thanks for such a helpful and comprehensive walkthrough!
This is probably one of the best videos on RUclips!
Amazing!! Thank you! The second method worked for me, to convert Colab notebooks to PDFs. Finally..
Thanks a lot. This is was very useful for my to submit my assignment.
This is amazing!!! My TA told me just print it which mess all my graphs
Adrian Dolinay is the best Python channel on RUclips
my plotly visuals are not visible in the pdf, what can be the reason for this?
Thanks for sharing... This was usefull for my project idea... Thanks a lot
How are you dragging and dropping the file?
Instead of dragging it you can download the file (File -> Download -> .ipynb) and then import it (the sheet whit an arrow )
This is so awesome. I wish I had learned this years ago!
If you do this :under File - Print -Click on it , from the printers ..select 'Microsoft Print to PDF' and then hit Print ..it will ask you the location where you want tosave this PDF and you just got your PDF ...you can print it later though. However this PDF will be balck and white and the code cells cannot be distinguished from the output cells when you print them ( like no color difference ) ...everything is just normal text
Excelent! That was very helpful to me.
Just what I was looking for - thanks so much!
Many thanks, Adrian. I really appreciate your explanation.
this tutorial really helped me, thank you!
thanks, helpful video!
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?
Thank you! It's helpful!
Thank you! You saved me!
thanks man you saved me
thx master!!! you save me!!
Thanks Adrian, but I am having some issues with Plotly graphs. Matplotlib ones are fine, but Plotly ones are not showing up in HTML.
Run the below code in the notebook you are looking to render:
import plotly.io as pio
pio.renderers.default='notebook'
Stack Overflow post that speaks about the issue: stackoverflow.com/questions/66210187/exporting-jupyter-notebook-with-plotly-to-html-not-displaying-correctly-when-off
Hey there, thanks for the video!
In case someone is interested how to refer directly to a file residing on Google Drive, here is the command:
from google.colab import drive
drive.mount('./mount')
!jupyter nbconvert --to html 'mount/My Drive/Colab Notebooks/NameOfFile.ipynb'
2nd method look nice but you have only 15 GB on Google drive and loss of one half GB on tex is quite large
thank you for sharing it
Hey Adrian, actually i'm new to google colab and my doubt is how we drag and drop the notebook to files in nbconvert package. Please help me.
Great video and explanation!
Thanks for sharing!
I tried to follow all the steps, and it says nbconvert command is not found in my Google Colab
Did you run the below code block first?
!sudo apt-get install texlive-xetex texlive-fonts-recommended texlive-plain-generic
@@AdrianDolinay No, I did not, sorry. Thank you for your reply so much. Now it's all working.
Muchas gracias, fue de mucha ayuda
Is there any possibility to convert it to epub format? Thank you for sharing.
Nice! Thank you!
its giving this error: raise OSError(
OSError: xelatex not found on PATH, if you have not installed xelatex you may need to do so.
can someone help please?
@@nirbhay2417 What was the code snippet for the error? And did you run "
!sudo apt-get install texlive-xetex texlive-fonts-recommended texlive-plain-generic" first?
@@AdrianDolinay It worked now..
I ran this extra command: !sudo apt-get update
now its creating the pdf from nbconvert...
Thanks a lot for your prompt response!!
Thanks!
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.
Hello! The GitHub thread below discusses this issues. Looks like the metadata needs to be edited. Hope this helps!
github.com/jupyter/nbconvert/issues/249
Thanks man
Excelent!!!
Life saving !
Unfortunately the notebook isn't in your github repository anymore
Have an updated repo, see the link below. Hope it helps!
github.com/ad17171717/RUclips-Tutorials/tree/main/Google%20Colab%20Tutorials/Exporting%20to%20a%20PDF%20Format
How to drag and drop bro...its not working on my computer
If you are having an issue with the drag and drop you can instead select the folder icon labeled "Files". In the top left under the "Files" title there is a paper icon with an arrow labeled "Upload to Session Storage". You can select that then upload your file. Hope this helps!
Nice! Thanks!
Great content. Any way to print without the code cells?
If you want to get rid of the input cells you can use the code below
!jupyter nbconvert --to pdf --no-input /content/KNN
@@AdrianDolinay thank you so much. Couldnt find this info anywhere lol
Hi, Pier Laurenzi, I couldn't find this either. Thanks to you and Adrian now I can. I highly recommend a Medium article with this. It is extremely useful!!!
it's so usefull
thank you
gratiluz 💖
How to avoid the pips output in pdf?
You can clear the pip output with "Clear Cell" within Jupyter or Google Colab. If you want to get rid of the cell completely, delete the cell and save the notebook then you can reinsert the pip installs once you've converted it to a PDF
not working sad
thnq
HOW CAN I DO THIS
HELP
Obviusly cuadro¡