Skip to content

niranjanakella/Jupyter-Notebook-to-PDF-Conversion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Jupyter-Notebook-to-PDF-Conversion

Conversion Mechanism


To convert a '.ipynb' Jupyter Notebook file into PDF, it should be intially be converted into a HTML file and then be converted into a pdf file for better representation.


Libraries and tools to be installed


  • Install "nbconvert" tool through pip.
pip install nbconvert

Note:- If you have installed Anaconda and you are running the above command on cmd (Windows Terminal) then nbconvert will only be accessable to applications using cmd flow. So, please run the above command even on Anaconda Prompt.

  • Download the "wkhtmltopdf" library/tool to convert the '.html' file to '.pdf' : - HERE
  • Install the "pdfkit" library through the following command
pip install pdfkit

Jupyter Notebook to PDF

Mechanism:- JupyterNotebook --> HTML --> PDF

  • Convert Jupyter Notebook to HTML file. In the below command mention the complete path of your jupyter notebook (Example: jupyter nbconvert --to html C:\Users\niran\Desktop\ipynb_to_pdf\mynotebook.ipynb).

  • Perform the below operation in Jupyter Terminal.
jupyter nbconvert --to html Yournotebook.ipynb

Jupyter Terminal can be found here:-

  • Further convert the HTML file into PDF file through the PDF_Converter.py file.

Note: - Go through the PDF_Converter.py file keenly.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages