Guide

Export an IPYNB File to PDF in VS Code

Export a Jupyter Notebook from VS Code, understand the TeX dependency, and use a local print alternative when appropriate.

Use VS Code when it is your notebook workspace

VS Code supports opening Jupyter notebooks through its Jupyter tooling and can export notebooks as Python, HTML, or PDF. It is useful when the notebook belongs to a workspace with its own Python environment, files, and source control.

Before running a notebook, choose the intended interpreter or kernel and confirm the required packages and files are available. Opening a file is safe read-only work; execution is a separate decision.

Export and inspect the result

Save the notebook after running the cells whose output should appear. In the notebook toolbar, use the Export controls and select the appropriate output format. Check the exported result before sharing it, especially for wide tables, long code, images, and saved errors.

VS Code documents that its PDF export requires TeX. If TeX is unavailable, an HTML export followed by browser printing is a documented fallback for a static PDF workflow.

Handle figures deliberately

Do not assume every rich output will survive PDF export. VS Code notes that SVG-only output is not displayed in its PDF export; include a non-SVG image representation when the figure must appear in the PDF.

The local converter also labels unsupported output instead of silently pretending it was preserved. Review the print preview and save a static version of any chart that needs a reliable document representation.

Use a local browser print alternative

When you only need a readable PDF of content already saved in the file, use this browser-side converter. It creates a preview without executing the notebook or transmitting its contents to a conversion server.

This is not a substitute for a team-controlled nbconvert template or a project build step. Use the environment-owned export route when repeatable publishing requirements depend on that toolchain.

Last reviewed against official documentation: 2026-08-09. Source: VS Code Jupyter Notebook documentation