spacy-course icon indicating copy to clipboard operation
spacy-course copied to clipboard

"Export slides deck to pdf" functionality

Open GiulioRossetti opened this issue 5 years ago • 2 comments

Hi, this project is indeed very nice.

What about implementing an "export to pdf" functionality for slides deck? I feel that it might be something useful to make teaching resources available also offline.

GiulioRossetti avatar Apr 26 '19 09:04 GiulioRossetti

Yes, I've been thinking about this as well. The slides are powered by reveal.js, so in theory, PDF export should be possible. But I haven't really tried this yet.

The Gatsby/React setup that basically creates new instances of the Reveal slides for each slides section on the page might need some additional workarounds to ensure it's only ever printing the slides. But we might be able to do that in the print stylesheet.

(An alternative approach would be to generate the PDFs at build time via Gatsby. But this feels unnecessarily complicated and means we likely wouldn't be able to take advantage of what Reveal.js already does out-of-the-box.)

ines avatar Apr 26 '19 15:04 ines

It seems that reveal.js's dynamic PDF export doesn't actually produce a PDF file. Rather, it produces a view that allows you to "print to PDF" in a way that requires a user to be sure to set layout to landscape, enable background graphics option, etc. decktape would generate PDFs at build time, but in a way that leverages reveal.js functionality (headless rendering), and it purports to support reveal.js.

I don't have immediate plans to try this, but I thought it'd be a helpful contribution to this thread. I am interested in perhaps building a course using ines/course-starter-python, and slide deck PDFs would be something I'd want.

dwinston avatar Jul 10 '20 21:07 dwinston