Question

I am using reStructuredText & rst2s5 to create S5 slide presentations. It is great but I also want to have the presentation in PDF. How can I convert S5 to PDF?

S5 are HTML based... one of S5 features is to create print-outs of your presentation. So when I try to use a PDF printer from the browser I just get print-outs. I want to a PDF with the slides, 1 slide per page and all the formatting, colors and font-size from the original presentation.

OTHER TIPS

If you just want to create pdf or don't mind getting a different theme for the pdf, you could also use one these:

http://pypi.python.org/pypi/rst2beamer/0.6.6

http://pypi.python.org/pypi/rst2odp/0.2.3

http://web.archive.org/web/20130718071252/http://lateral.netmanagers.com.ar/stories/BBS52.html

It is also possible to theme these to get the same theme as for the S5 presentation, but it takes a bit more work. I'm currently using rst2pdf with my own custom theme.

The latter link, for example, suggests using the following commandline:

rst2pdf slides.txt -b1 -s slides.style

with slides.style containing:

{"pageSetup": {
    "width": "16cm",
    "height": "9cm",
    "margin-top": "0cm",
    "margin-bottom": "0cm",
    "margin-left": "0cm",
    "margin-right": "0cm",
    "margin-gutter": "0cm",
    "spacing-header": "5mm",
    "spacing-footer": "5mm",
    "firstTemplate": "cutePage"
},
"pageTemplates" : {
    "cutePage": {
        "frames": [
            ["10%", "10%", "80%", "80%"]
        ],
        "background" : "background.svg"
    }
}
}

You should try the "wkhtmltopdf" command, which uses the well-known WebKit HTML rendering engine in the same mode that it uses when you select "Print" from the menu of a WebKit-powered browser.

On Ubuntu, with the "Universe" repository enabled, it's already available so I can just install it as a package.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top