Skip to content

Conversation

@timkpaine
Copy link
Contributor

@timkpaine timkpaine commented Nov 14, 2025

xref: nbprint/nbprint#243

In certain contexts, it can be convenient to render to HTML and render inside a browser, without necessarily converting to PDF. For example, in the linked ticket, I am converting to HTML which is intended to be emailed. Once you hit an email client, there is no more JavaScript, so it would be convenient to have NBconvert render the HTML in a browser and then export the DOM back to HTML, exactly as it does for PDF but resulting in an HTML document instead of a PDF.

One would expect this to have certain side effects when reconstructing inside a JavaScript-enabled environment - but in that case, just use the vanilla HTML exporter.

I've also made the WebPDFExporter inherit from the WebHTMLExporter to minimize code duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant