How to Convert Jupyter Notebook to PDF Without LaTeX
Learn how to export your Jupyter Notebook to PDF without installing LaTeX. Three practical methods including browser-based conversion.
How to Convert Jupyter Notebook to PDF Without LaTeX
Exporting a Jupyter Notebook to PDF is one of the most common tasks data scientists and researchers need to do — whether for sharing a report with a manager, submitting homework, or archiving an analysis. The problem is that the standard method requires LaTeX, a complex typesetting system that takes up gigabytes of disk space and frequently fails to install correctly.
This guide covers several methods to convert Jupyter Notebooks to PDF without needing LaTeX at all.
Why Does LaTeX Even Come Into the Picture?
The traditional Jupyter-to-PDF export pipeline works like this:
- nbconvert converts your
.ipynbto a.texfile (LaTeX source) - A LaTeX compiler (like
xelatexorpdflatex) compiles the.texto PDF
This two-step process is why you often see errors like:
nbconvert failed: xelatex not found on PATH
or:
LaTeX failed to compile the .tex file
Even when you have LaTeX installed, version mismatches and missing packages can cause compilation to fail. For many users, this is simply too much friction.
Method 1: Browser-Based Conversion (Recommended)
The easiest method — and the one that requires zero installation — is to use a browser-based converter like notebookconvert.com.
How it works:
- Upload your
.ipynbfile to the converter - Select "PDF" as the output format
- Click "Convert to PDF"
- In the browser's print dialog, choose "Save as PDF"
The converter parses your notebook in the browser, renders all cells (code with syntax highlighting, markdown, charts, DataFrames) to HTML, then uses the browser's built-in PDF printing engine. The result is a clean, readable PDF.
Advantages:
- No installation of any kind
- No LaTeX, no nbconvert, no Python environment
- Your files never leave your computer — 100% private
- Works on Windows, Mac, Linux, and even Chromebooks
What's preserved:
- Code cells with syntax highlighting
- Markdown with headings, bold, italic, lists, links
- Matplotlib and seaborn charts (PNG/SVG)
- Pandas DataFrames as formatted HTML tables
- LaTeX equations (via MathJax, rendered in browser)
- Error tracebacks and stream output
Method 2: nbconvert with WebPDF (No LaTeX)
Starting with Jupyter Notebook 6.x and nbconvert 6.x, there is an experimental webpdf exporter that uses a headless Chromium browser instead of LaTeX.
pip install nbconvert[webpdf]
playwright install chromium
jupyter nbconvert --to webpdf my_notebook.ipynb
Advantages:
- Works from the command line, good for automation
- No LaTeX required
- Better HTML fidelity than the LaTeX pipeline
Disadvantages:
- Requires installing Playwright and downloading Chromium (~150 MB)
- Still requires Python and nbconvert installed
webpdfis marked as experimental in some versions
Method 3: Export to HTML, Then Print to PDF
If you already have Jupyter installed, you can use the "HTML" export which doesn't require LaTeX, then open the HTML in a browser and print to PDF.
jupyter nbconvert --to html my_notebook.ipynb
This creates my_notebook.html. Open it in Chrome or Firefox, then press Ctrl+P (or Cmd+P on Mac) and choose "Save as PDF".
Advantages:
- No LaTeX required
- Uses your existing Jupyter installation
Disadvantages:
- Two-step process
- Requires Jupyter to be installed
Method 4: VS Code "Export as PDF"
If you use VS Code with the Jupyter extension, you can export directly to PDF from within VS Code — without opening a terminal:
- Open your
.ipynbfile in VS Code - Click the
...menu in the top-right of the notebook - Select "Export" → "PDF"
This uses a headless browser under the hood (similar to the webpdf approach).
Tips for Better PDF Output
Regardless of which method you use, here are some tips for cleaner PDF output:
Set a reasonable figure size: Large figures can overflow page boundaries. In matplotlib:
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(8, 5))
Add a title cell: Start your notebook with a markdown heading cell. It becomes the document title.
Remove debug output: Delete or clear cells that contain very long outputs (like full model training logs) before exporting.
Check margins in the print dialog: Setting margins to "Minimum" or "None" usually gives a cleaner look.
Enable background graphics: In Chrome's print dialog, expand "More settings" and check "Background graphics" to preserve syntax highlighting colors.
Conclusion
LaTeX is not required to get a good PDF from a Jupyter Notebook. The browser-based approach — whether using an online tool or the nbconvert webpdf exporter — produces results that are equal to or better than the LaTeX pipeline for most use cases, without any of the installation complexity.
For a quick one-off conversion, notebookconvert.com is the fastest option. For automated pipelines, the nbconvert webpdf approach gives you the same quality from the command line.