how to convert jupyter notebook to pdf

How to Convert Jupyter Notebooks to PDF

In this tutorial we will see how to convert your jupyter notebook or ipython notebooks to pdf or html.

There are several ways of accomplishing this task, but we will be using two of these methods

To begin , you will need to install the following required packages such as

  • nbconvert
  • pandoc
  • texlive xetex/miktex

These requirement are needed for both windows and unix based systems such as linux.

For Linux

sudo apt-get install pandoc texlive-xetex

For Windows

You can get the software from their official website  below


Using the CLI Option

To use the CLI option, you can use nbconvert that comes already with jupyter lab or jupyter notebook.

In case you do not have it installed you can use pip install nbconvert to install it.

To create a pdf or html from the notebook you can use the following commands in the terminal

jupyter nbconvert --to FORMAT mynotebook.ipynb

To Convert to PDF

jupyter nbconvert –to pdf mynotebook.ipynb

You can also use this format to convert multiple notebooks at once

jupyter nbconvert –to pdf mynotebook.ipynb notebook2.ipynb


You can check the video tutorial below


Thanks for your time

Jesus Saves

By Jesse E.Agbe(JCharis)

Leave a Comment

Your email address will not be published. Required fields are marked *