Replies: 3 comments
-
Print does not currently support rendered printing of Jupyter notebooks. Printing as source code is the primary use case. I added special handling to render Markdown documents because I wanted to print one and had pretty much a reaction parallel to yours with Jupyter notebooks -- rendered is the only sensible way to print them. The only thing I know about Jupyter notebooks is the name. I don't know what they're for or how VS Code handles them, so if you want support for rendered printing, you'll have to figure it out how to render a notebook as HTML. I have a lot on at the moment, so I cannot offer to undertake the required learning any time soon. If VS Code can display them rendered, then it may be possible to hijack the rendering pipeline. That's how I handle Markdown. Once you know how to render a notebook as HTML, I can certainly help you integrate this into Print, and from there you can print to PDF. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the timely reply. If I find out, I will post it. |
Beta Was this translation helpful? Give feedback.
-
Have a look at this extension https://github.com/jithurjacob/vscode-nbpreviewer and see whether you can figure it out from there. You are looking for a function that takes the notebook string and returns HTML. There may not be one -- it is possible that the extension expects the HTML to load js that renders in the browser (or in this case in the WebView control). |
Beta Was this translation helpful? Give feedback.
-
Hello, just seems to print the source code... Any ideas how to best obtain a .pdf? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions