Skip to content
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

Export pages to PDF #267

Closed
choldgraf opened this issue Aug 22, 2019 · 3 comments
Closed

Export pages to PDF #267

choldgraf opened this issue Aug 22, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@choldgraf
Copy link
Collaborator

There are many cases where readers would like a static PDF version of a page. This issue is for tracking this enhancement.

There are two obvious approaches to me for this:

  • Using nbconvert or pandoc, which will use latex under the hood to do the conversion
  • Using puppeteer, which simulates a browser and renders the PDF as the page is styled

I'm thinking the puppeteer approach would be the coolest, as then we have the same design in static or "live". @yuvipanda has a pretty nifty version of this already working over here:

https://github.com/yuvipanda/nbpdfexport/blob/master/nbpdfexport/__init__.py

So I wonder if we could repurpose that tool, or at least that workflow to accomplish the same thing with jupyter book. Ideally, we could do this within the "jupyter page" framework for really nice single-page output.

@choldgraf choldgraf added the enhancement New feature or request label Aug 22, 2019
@emdupre
Copy link
Collaborator

emdupre commented Aug 22, 2019

This would be amazing 🚀 Just to make sure I understand -- do you mean the result would look something like this ?

https://explorablemultiverse.github.io/examples/frequentist/

@choldgraf
Copy link
Collaborator Author

I think that what this would let us do is to define the layout / style of each page with CSS, and then just render that as PDF. So yeah, I think it could let us get something like the link you showed.

@choldgraf
Copy link
Collaborator Author

This is now fixed by #279 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants