Jupyter export to PDF without code

Does anyone have any way to export a Jupyter notebook to PDF with the code hidden? I have nb extensions already installed, but all the techniques I know work for HTML exports and not PDF.

When I read about creating templates, etc, it doesn’t work for me. So, if someone has successfully done this, I would love to see it.


Have you looked at nbconvert? It supports PDF, and if you play with the options you might find a way to suppress code cells (I’d start by playing with no-input).

Worst case scenario you could create a custom nbconvert template, but that can be very fiddly!

Check out https://pandoc.org/

1 Like