PDF Export
Presentations can be exported to PDF via a special print stylesheet. This feature requires that you use Google Chrome or Chromium and to be serving the presentation from a web server. Here’s an example of an exported presentation that’s been uploaded to SlideShare: http://www.slideshare.net/hakimel/revealjs-300.
Separate pages for fragments
Fragments are printed on separate slides by default. Meaning if you have a slide with three fragment steps, it will generate three separate slides where the fragments appear incrementally.
If you prefer printing all fragments in their visible states on the same slide you can set the pdfSeparateFragments
config option to false.
Page size
Export dimensions are inferred from the configured presentation size. Slides that are too tall to fit within a single page will expand onto multiple pages. You can limit how many pages a slide may expand onto using the pdfMaxPagesPerSlide
config option, for example Reveal.configure({ pdfMaxPagesPerSlide: 1 })
ensures that no slide ever grows to more than one printed page.
Print stylesheet
To enable the PDF print capability in your presentation, the special print stylesheet at /css/print/pdf.css must be loaded. The default index.html file handles this for you when print-pdf
is included in the query string. If you’re using a different HTML template, you can add this to your HEAD:
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
Instructions
- Open your presentation with
print-pdf
included in the query string i.e. http://localhost:8000/?print-pdf. You can test this with revealjs.com?print-pdf.- If you want to include speaker notes in your export, you can append
showNotes=true
to the query string: http://localhost:8000/?print-pdf&showNotes=true
- If you want to include speaker notes in your export, you can append
- Open the in-browser print dialog (CTRL/CMD+P).
- Change the Destination setting to Save as PDF.
- Change the Layout to Landscape.
- Change the Margins to None.
- Enable the Background graphics option.
- Click Save.
Alternatively you can use the decktape project.