If you have LaTeX installed you can download as PDF directly from Jupyter notebook with File -> Download as -> PDF via LaTeX (.pdf). Otherwise follow these two steps.

  1. For HTML output, you should now use Jupyter in place of IPython and select File -> Download as -> HTML (.html) or run the following command:

     jupyter nbconvert --to html notebook.ipynb  
    

    This will convert the Jupyter document file notebook.ipynb into the html output format.

    Google Colaboratory is Google's free Jupyter notebook environment that requires no setup and runs entirely in the cloud. If you are using Google Colab the commands are the same, but Google Colab only lets you download .ipynb or .py formats.

  2. Convert the html file notebook.html into a pdf file called notebook.pdf. In Windows, macOS (brew install wkhtmltodf) or Linux, install wkhtmltopdf. wkhtmltopdf is a command line utility to convert html to pdf using WebKit. You can download wkhtmltopdf from the linked webpage, or in many Linux distros it can be found in their repositories.

     wkhtmltopdf notebook.html notebook.pdf   
    

Original (now almost obsolete) revision: Convert the IPython notebook file to html.

ipython nbconvert --to html notebook.ipynb

Answer from karel on Stack Overflow
Top answer
1 of 16
154

If you have LaTeX installed you can download as PDF directly from Jupyter notebook with File -> Download as -> PDF via LaTeX (.pdf). Otherwise follow these two steps.

  1. For HTML output, you should now use Jupyter in place of IPython and select File -> Download as -> HTML (.html) or run the following command:

     jupyter nbconvert --to html notebook.ipynb  
    

    This will convert the Jupyter document file notebook.ipynb into the html output format.

    Google Colaboratory is Google's free Jupyter notebook environment that requires no setup and runs entirely in the cloud. If you are using Google Colab the commands are the same, but Google Colab only lets you download .ipynb or .py formats.

  2. Convert the html file notebook.html into a pdf file called notebook.pdf. In Windows, macOS (brew install wkhtmltodf) or Linux, install wkhtmltopdf. wkhtmltopdf is a command line utility to convert html to pdf using WebKit. You can download wkhtmltopdf from the linked webpage, or in many Linux distros it can be found in their repositories.

     wkhtmltopdf notebook.html notebook.pdf   
    

Original (now almost obsolete) revision: Convert the IPython notebook file to html.

ipython nbconvert --to html notebook.ipynb

2 of 16
37

Also pass the --execute flag to generate the output cells

jupyter nbconvert --execute --to html notebook.ipynb
jupyter nbconvert --execute --to pdf notebook.ipynb

The best practice is to keep the output out of the notebook for version control, see: Using IPython notebooks under version control

But then, if you don't pass --execute, the output won't be present in the HTML, see also: How to run an .ipynb Jupyter Notebook from terminal?

For an HTML fragment without header: How to export an IPython notebook to HTML for a blog post?

Tested in Jupyter 4.4.0.

🌐
nbconvert
nbconvert.readthedocs.io › en › latest › usage.html
Using as a command line tool — nbconvert 7.17.1 documentation
This will open the notebook, execute it, capture new output, and save the result in mynotebook.nbconvert.ipynb. Specifying --inplace will overwrite the input file instead of writing a new file. By default, nbconvert will abort conversion if any exceptions occur during execution of a cell. If you specify --allow-errors (in addition to the --execute flag) then conversion will continue and the output from any exception will be included in the cell output.
Discussions

Converting Jupyter Notebooks to PDF: Exploring Your Options
Does the ploomber tool just run nbconvert? What about things like headers that are also links, images, emojis, and building out table of contents? Can we add a branded header and footer to our documents to make them look professional? The Jupyter to PDF process drives me insane. The web PDF seems to keep it the closest to original, but you have to print to like 11x17 sized sheets in landscape for large tables which looks a bit ridiculous. I definitely think there's a need for a better tool there. More on reddit.com
🌐 r/IPython
7
4
September 24, 2024
Is there a way to convert jupyter notebook to pdf using NBCONVERT in windows prompt? - Stack Overflow
I'm trying to convert a jupyter notebook file (.ipynb) to PDF with this command line: jupyter nbconvert --to pdf {my file}.ipynb But I get this: [NbConvertApp] WARNING | Config option template_pat... More on stackoverflow.com
🌐 stackoverflow.com
In Jupyter Notebook, how to convert .ipynb file into a PDF , with only outputs ?
Edit: Ignore everything I say here and see my reply. We can use a template for nbconvert. Create a file called "no_input.tplx" and in it: ((* 'extends 'article.tplx' *)) ((* block input scoped *))((* endblock input *)) This will overwrite input blocks to contain nothing. Also, you can replace the template in the first line with your favourite template to inherit from. ( May I suggest mine ). Now either place this file inside of nbconvert or your working directory or inside of a directory where nbconvert can find the template (this directory can be set in nbconvert's configfile). Then to convert to a pdf from the terminal run: jupyter nbconvert --to pdf .ipynb --template no_input.tplx You can add an additional flag --no-prompt to remove all prompt or --TemplateExporter.exclude_input_prompt=True to only remove input prompts. Removal of prompts might not work unless you upgrade nbconvert (the fix may not be released yet) or use my template. More on reddit.com
🌐 r/Python
4
8
July 2, 2018
Downloading a PDF from Jupyter
You can just print to PDF. More on reddit.com
🌐 r/WGU_MSDA
20
6
August 16, 2023
🌐
nbconvert
nbconvert.readthedocs.io
nbconvert: Convert Notebooks to other formats — nbconvert 7.17.1 documentation
Primarily, the nbconvert tool allows you to convert a Jupyter .ipynb notebook document file into another static format including HTML, LaTeX, PDF, Markdown, reStructuredText, and more.
🌐
Reddit
reddit.com › r/ipython › converting jupyter notebooks to pdf: exploring your options
r/IPython on Reddit: Converting Jupyter Notebooks to PDF: Exploring Your Options
September 24, 2024 -

Converting Jupyter notebooks to PDF can be quite handy, especially when you want to share your analyses with others who may not have Jupyter installed. However, navigating the various options for conversion can be a challenge. I've recently put together a blog post that reviews two popular methods: nbconvert and Quarto.

In the post, I break down the setup process, features, and limitations of each method to help you decide which one might be the best fit for your needs.

nbconvert

nbconvert is the official library from the Jupyter team that's designed for this task. It offers versatility by letting you convert notebooks into formats like PDF through two approaches: WebPDF and the traditional PDF via LaTeX.

The WebPDF method is simpler to set up, while the LaTeX route tends to yield higher-quality documents—ideal for complex mathematical content but comes with more installation hurdles.

Quarto

On the other hand, Quarto provides a comprehensive solution for converting Jupyter notebooks into PDFs, but it does require a bit more effort to get everything working. It’s feature-rich and offers great customization, though the learning curve can be a bit steep.

In my experience, many users start out with nbconvert using WebPDF for quick needs and then graduate to using XeTeX as their requirements grow more sophisticated. Quarto, while powerful, is often suited for those with very specific document formatting needs.

For anyone interested in learning more about these options and their respective setups, you can check out the full details in my blog post here: Converting Jupyter Notebooks to PDF

🌐
Runcell
runcell.dev › tool › jupyter-to-pdf
Ipynb (Jupyter Notebook) to PDF Converter
Convert .ipynb (Jupyter Notebook files) to .pdf in your browser—free, private first. Converter with print preview, plus nbconvert tutorial for professional PDF output.
🌐
Ploomber
ploomber.io › blog › jupyter-notebook-convert
Converting Jupyter notebooks to PDF
September 12, 2024 - # install nbconvert pip install nbconvert # you must install pandoc and xetex before using it! # convert to pdf using webpdf jupyter nbconvert mynotebook.ipynb --to pdf
🌐
Ipython-books
ipython-books.github.io › 32-converting-a-jupyter-notebook-to-other-formats-with-nbconvert
IPython Cookbook - 3.2. Converting a Jupyter notebook to other formats with nbconvert
[NbConvertApp] Converting notebook test.ipynb to html [NbConvertApp] Writing 253784 bytes to test.html · 9. Let's display this document in an <iframe> (a small window showing an external HTML document within the notebook): from IPython.display import IFrame IFrame('test.html', 600, 200) 10. We can also convert the notebook to LaTeX and PDF.
Find elsewhere
🌐
nbconvert
nbconvert.readthedocs.io › _ › downloads › en › stable › pdf pdf
nbconvert Documentation Release 7.17.0 Jupyter Development Team Jan 29, 2026
Primarily, the nbconvert tool allows you to convert a Jupyter .ipynb notebook document file into another static · format including HTML, LaTeX, PDF, Markdown, reStructuredText, and more.
🌐
Saturn Cloud
saturncloud.io › blog › how-to-convert-ipynb-to-pdf-in-jupyter-notebook
How to Convert ipynb to PDF in Jupyter Notebook | Saturn Cloud Blog
December 7, 2023 - Once you’ve installed nbconvert, you can convert your Jupyter Notebook to PDF. Open your terminal and navigate to the directory where your Jupyter Notebook is located. Then, run the following command: ... Replace saturnclou1.ipynb with the name of your Jupyter Notebook file.
🌐
Runcell Blog
runcell.dev › blog › nb-convert-tutorial
Jupyter nbconvert: Convert Notebooks to HTML, PDF & Python – Runcell Blog
Jupyter nbconvert lets you export .ipynb notebooks to HTML, PDF, Python scripts, Markdown, slides, and more — directly from the command line.
🌐
Vertopal
vertopal.com › en › convert › ipynb-to-pdf
Online IPYNB (Jupyter Notebook) to PDF Converter - Vertopal
Convert IPYNB (Jupyter Notebook) documents to PDF file format using Vertopal free online converter tools. You can edit and optimize your documents.
🌐
Medium
mrjacklu.medium.com › turn-your-meh-notebook-ipynb-into-pretty-a-pdf-on-macos-d8934c2dbf41
Turn your meh Notebook (.ipynb) into a pretty PDF on MacOS | by Jack Lu | Medium
December 5, 2020 - Anyway, please visit and rectify your error right away: https://nbconvert.readthedocs.io/en/latest/install.html ... Next let’s install pandoc, please visit: http://www.texts.io/support/0003/. You will see a page that looks like image below. Alternative site to download pandoc: https://pandoc.org/installing.html
🌐
DEV Community
dev.to › mycko22 › 5-ways-to-convert-ipynb-to-pdf-for-data-scientists-and-students-419f
5 Ways to Convert IPYNB to PDF for Data Scientists and Students - DEV Community
May 10, 2025 - Install pandoc and a LaTeX distribution (e.g., TeX Live). Navigate to your notebook’s directory in the terminal. Run:jupyter nbconvert --to pdf your_notebook.ipynb
🌐
MLJAR
mljar.com › blog › jupyter-notebook-pdf
The 4 ways to export Jupyter Notebook as PDF
May 28, 2022 - jupyter nbconvert --to webpdf --no-input your-notebook-file.ipynb
🌐
Trymito
trymito.io › blog › how-to-convert-ipynb-to-pdf
How to Convert ipynb to PDF | Mito
To create a PDF without the code cells, add the --no-input option: jupyter nbconvert --to webpdf --allow-chromium-download --no-input YOUR_NOTEBOOK_NAME.ipynb
🌐
Medium
tariqueakhtar-39220.medium.com › converting-jupyter-notebooks-to-pdf-with-nbconvert-a-step-by-step-guide-2948c2792fbc
Converting Jupyter Notebooks to PDF with nbconvert: A Step-by-Step Guide | by Tarique Akhtar | Medium
May 23, 2023 - Follow the steps below to generate a PDF version of your notebook: ... If you want to download jupyter notebook without code for presenting the analysis to business, you can run below command. jupyter nbconvert your_notebook.ipynb --to slides ...
🌐
Hyunyoung2
hyunyoung2.github.io › 2018 › 09 › 20 › How_To_Convert_ipynb_To_PDF
How to convert ipynb file to PDF
LaTeX includes 'base', 'article' and 'report'. HTML includes 'basic' and 'full'. You can specify the flavor of the format used. > jupyter nbconvert --to html --template basic mynotebook.ipynb
🌐
PyPI
pypi.org › project › nbconvert
nbconvert
JavaScript is disabled in your browser. Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser