-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jupyterlite doesn't have print option #543
Comments
The print feature upstream relies on server-side To get to something better we have a few options:
|
Dear @bollwyvl I had a similar issue while trying to export a notebook as html. If I understand correctly your previous answer, this is also because |
nbconvert (or any substitute) is not (yet) available in jupyterlite.
Yep.
|
nbconvert (with mad hacks) is now (somewhat) available in (a soon-to-be-released) jupyterlite. |
@bollwyvl I am hung up on the "somewhat" available part. From the link above, it appears that v0.1.0b12 includes the ability to print a notebook to a pdf. I working with this version. The example from this gist is pretty intense. Is the implication that you need to run through the commands on the page referenced to create a context for converting and downloading a notebook to a PDF? I have moved through the gist but ran into issues right at the end of the process. The HTMLExporter in nbconvert has been moved for one, that was not a big deal -- nbconvert.exporters.HTMLExporter -- but the second involves a problem with bleach not having the attribute ALLOWED_STYLES defined. The error suggests upgrading bleach to 5 or greater. But this did not work. I am able to read in the notebook which is great -- I just need the last step! Am I missing something here? |
I haven't revisited this in a while, and while certainly no upstreams have
made this easier, I'm not particularly surprised the gist no longer works.
PDF export is not really going to happen, natively, through any of the
nbconvert mechanisms (pandoc/latex, headless browser, qt). Some of these
_have_ been compiled to wasm, which indeed would be a lower-friction way to
deliver them to users, as they are all very tricky to get/keep working on
many platforms.
To this end, I'm still of the mind that trying to do this _in_ a kernel (or
even python-in-wasm-but-not-kernel) is not worth the effort, and a proper
implementation should start with a lab extension that reimplements the
stack on top of JS, with e.g. nunjucks. This would allow it to, for
example, emulate "--execute" with any kernel, using only real contents and
kernel APIs, and therefore work in a full jupyterlab/notebook(7).
|
Ok, I am with you. I will look into an extension. Thanks that helps a lot. |
Is there any reason nbconvert cannot be compiled into a jupyterlite build (w/ emscripten)? When I:
|
BUG,404: JupyterLite: |
In this new interface, the print option is gone and there is no way to save the notebook as pdf. Is there an alternative? or can't you just bring the print option back?
The text was updated successfully, but these errors were encountered: