How to export Jupyter Notebook as PDF

Learn how to export Jupyter Notebook to PDF using various methods, such as nbconvert, LaTeX, online conversion services, and Jupyter Notebook extensions. Choose the best method for your needs and convert your Jupyter Notebooks to shareable PDFs with ease.

As the popularity of Jupyter Notebook has grown, so has the need to export these notebooks into various formats, including PDF. In this article, we will explore all the ways to export Jupyter Notebook as PDF.

Simplify your Jupyter Notebook management with Saturn Cloud. Join for free.

Using nbconvert:

One of the easiest ways to convert Jupyter Notebook to PDF is by using nbconvert. This is a command-line tool that comes with Jupyter Notebook installation. Here are the steps to follow:

Step 1: Open the terminal and navigate to the directory where the Jupyter Notebook file is saved.

Step 2: Type the following command:

jupyter nbconvert --to pdf notebook.ipynb

Here, notebook.ipynb is the name of the Jupyter Notebook file that you want to convert to PDF.

Step 3: Hit enter and wait for the conversion to complete.

Using LaTeX:

LaTeX is a document preparation system that is commonly used to create scientific and technical documents. It is also a popular tool to convert Jupyter Notebook to PDF. Here are the steps to follow:

Step 1: Open the Jupyter Notebook file that you want to convert to PDF.

Step 2: Click on File > Download As > PDF via LaTeX (.pdf)

Step 3: Wait for the conversion to complete.

Note: You need to have LaTeX installed on your system to use this method.

Alt text

Using HTML:

Step 1: Open the Jupyter Notebook file that you want to convert to PDF.

Step 2: Click on File > Download As > PDF via HTML (.html)

Step 3: Wait for the conversion to complete.

Note: You need to have Pyppeteer installed on your system to use this method by running pyppeteer-install on your Terminal.

Alt text

Using PDF conversion services:

There are several online PDF conversion services that allow you to convert Jupyter Notebook to PDF. Here are some of the popular ones:

a. CloudConvert:

CloudConvert is a popular online file conversion service that supports over 200 file formats, including Jupyter Notebook and PDF. Here are the steps to follow:

Step 1: Open the CloudConvert website.

Step 2: Click on the Select Files button and select the Jupyter Notebook file that you want to convert.

Step 3: Choose PDF as the output format.

Step 4: Click on the Convert button and wait for the conversion to complete.

b. Zamzar:

Zamzar is another popular online file conversion service that supports Jupyter Notebook to PDF conversion. Here are the steps to follow:

Step 1: Open the Zamzar website.

Step 2: Click on the Add Files button and select the Jupyter Notebook file that you want to convert.

Step 3: Choose PDF as the output format.

Step 4: Enter your email address and click on the Convert button.

Step 5: Wait for the conversion to complete. You will receive the converted PDF file in your email.

Simplify your Jupyter Notebook management with Saturn Cloud. Join for free.

In this article, we explored all the ways to export Jupyter Notebook as PDF. Each method has its own advantages and disadvantages, and you can choose the one that suits your needs the best. Whether you prefer command-line tools, online services, or Jupyter Notebook extensions, there is a method available to convert your Jupyter Notebook to PDF.


About Saturn Cloud

Saturn Cloud is your all-in-one solution for data science & ML development, deployment, and data pipelines in the cloud. Spin up a notebook with 4TB of RAM, add a GPU, connect to a distributed cluster of workers, and more. Join today and get 150 hours of free compute per month.