jupyter / nbconvert

Jupyter Notebook Conversion
https://nbconvert.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.75k stars 569 forks source link

Feature request: directly exporting notebook slides to PDF #713

Open eseiver opened 6 years ago

eseiver commented 6 years ago

What this person said: https://github.com/ipython/ipython/issues/9348

Would be amazing to have notebook to slides to PDF in one line as in: jupyter nbconvert --to pdfslides /path/to/your/notebook.ipynb

wesleyjr01 commented 6 years ago

Is there a solution for this?

bollwyvl commented 6 years ago

Unsurprisingly, you need a Real Browser in the loop. Currently, the best solution I have heard of, but not tried in anger, is decktape https://github.com/astefanutti/decktape which uses Chrome and puppeteer. It says RISE https://github.com/damianavila/RISE (which you should try, if you haven't!), but should work with vanilla nbformat slideshow metadata.

I am personally wary of Chrome-based workflows, as it's really hard to get something reproducible (e.g. year over year for courses) unless you package it all up as a magic Docker container, and then trust it forever, but at present the firefox/geckodriver PDF export situation is not ideal. MY preference would be for us to someday find something that works with the Qt stack, which has a sanely-embedded Chromium, but I haven't explored it in some time.

On Sat, Nov 3, 2018 at 2:13 PM Wesley André Bortolozo Júnior < notifications@github.com> wrote:

Is there a solution for this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jupyter/nbconvert/issues/713#issuecomment-435609344, or mute the thread https://github.com/notifications/unsubscribe-auth/AACxRJSvbri-Q6z-AW9Oy2WYD5yB0Iv0ks5urdzkgaJpZM4Qw5nw .

maartenbreddels commented 6 years ago

The strategy I use in #901 might work, start a webserver (running in nbserver) with some extra js that will use html2canvas and send the screenshots back to the server.