paulrouget / dzslides

DZSlides is a one-file HTML template to build slides in HTML5 and CSS3.
http://paulrouget.com/dzslides
931 stars 254 forks source link

PDF conversion #110

Open blackheaven opened 11 years ago

blackheaven commented 11 years ago

I need a way to convert my slides into PDF, can it be in the next release?

hsablonniere commented 11 years ago

We accept pull requests ;-)

More seriously this is a feature that we also want. I'm not sure when we would be able to release it...

blackheaven commented 11 years ago

I'd be happy to do it but I have no idea where to begin, if you want to give me some hints, I can try :)

hsablonniere commented 11 years ago

The quick and clean way I would see would be to use phantomsjs for generation or just a print sheet. You would have to change de CSS to have a slide per page...

jerrywham commented 11 years ago

First, thank you very much for this great tool. I'll try to make an authoring tool in KISS sprit. To convert slides in pdf, you can use tcpdf for that. It's a librairy you can find at http://www.tcpdf.org/

laughedelic commented 10 years ago

Any updates here?

paulrouget commented 10 years ago

Use pandoc: http://johnmacfarlane.net/pandoc/

laughedelic commented 10 years ago

@paulrouget what for? I'm using pandoc to produce a dzslides presentation from markdown. But I want to get a pdf that looks exactly the same as this presentation. Converting with pandoc from html to pdf is a completely different thing.

equalsraf commented 10 years ago

Hi, thanks for dzslides!

There are a couple of raster based converters. Try http://wkhtmltopdf.org/, or webslides2pdf. The pdf might be a bit big though.

LittleHelicase commented 10 years ago

Hi there,

I created a hacky "solution" to this problem. I added a "shell" that creates a lot of Iframes which contain the slides. You can use the print dialog to get a PDF of your slides. It seems to work with different custom styles (although there is a little border around the slides, you can try to adjust this). You get a PDF with text selection which is rather small in size, compared to other methods where you get one image per slide and thus a huge PDF file. It works with Chrome out of the box.. I tried it with firefox, but there is no preview and I got tired of trying :(. I didn't bother trying other browsers!

But there are some issues. If you have a lot of slides especially with mathjax you should increase the iframe-load time (there is a timeout in print-iframe.html until it loads the next slide). Each slide loads ALL slides in one iframe and only shows one slide! It can take much RAM, so be careful.

If you are interested: 1cf0a7acb0a3c11dd741f3ee6711bc5436dedbb9

astefanutti commented 8 years ago

For reference, I've developed and used DeckTape to export DZSlides presentations to PDFs. An example of an Asciidoctor+DZSlides presentation that I've exported to PDF.