Convert a notebook, select Report Only, then generate and review the PDF. Hiding source code changes the PDF; it does not modify your original Notebook.

How to hide code in the exported PDF

  1. Run the relevant cells in your own Jupyter environment and save the .ipynb with its results.
  2. Open the IPYNB to PDF converter and choose the saved Notebook.
  3. Select Report Only instead of Full Notebook.
  4. Choose your paper size, orientation, font size and margins, then select Generate PDF.
  5. Check the actual PDF preview and select Download PDF.

If you already generated a Full Notebook PDF, switch to Report Only and select Regenerate PDF. Downloading resumes when the updated PDF is ready.

What stays in Report Only?

Markdown headings and explanations stay visible, along with supported saved text, tables, embedded PNG/JPEG images and common formulas. Python source inside code cells is hidden. Code written inside a Markdown block remains part of the explanation and stays visible.

For example, the study-session example contains the Python source that calculates the average quiz score and a saved chart and table. Full Notebook shows the source; Report Only keeps the explanation, table, chart and saved results.

Hiding code does not remove every reference to it

Saved outputs may contain commands, printed source, file paths or error tracebacks. Markdown may also describe implementation details. Report Only keeps that content. Review the PDF and remove anything you do not want to share from an export copy before converting again.

Does this run the Notebook or change the file?

No. Conversion reads saved content locally in your browser. It never starts a Python kernel, uploads your Notebook or writes changes back to the original file. The downloaded PDF is a separate document.

Why does a hidden code cell still need saved output?

Report Only uses the same saved-content checks as Full Notebook. A non-empty code cell without saved output stops conversion even when its source would be hidden. Run and save the intended result, or remove intentionally output-free cells from an export copy. See how to fix missing outputs.

Make the results readable on paper

Use landscape orientation and compact margins for wide tables. Interactive widgets need a saved static fallback; remote images, SVG and custom CSS are unsupported. The PDF keeps selectable text and table values, while formulas are vector graphics.

For the full browser workflow, read Jupyter Notebook to PDF without LaTeX. For layout failures, use wide-table troubleshooting, or browse all export guides.