aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorgilxa1226 <mike.haller@gmail.com>2017-02-07 07:43:41 -0500
committerGitHub <noreply@github.com>2017-02-07 07:43:41 -0500
commitbcfb65658fec94e5aac6bd53b9e294bef4fd95d4 (patch)
treed16be4668811419afbf3fd55c8e7aacdc756a714 /README.md
parent1413cbc1a9344a6366c30fb0e83d5b6afc18f6d3 (diff)
downloadfosdem-2018-presentation-bcfb65658fec94e5aac6bd53b9e294bef4fd95d4.tar
fosdem-2018-presentation-bcfb65658fec94e5aac6bd53b9e294bef4fd95d4.tar.gz
Update README.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.md b/README.md
index 8797a07..2e08853 100644
--- a/README.md
+++ b/README.md
@@ -847,6 +847,19 @@ Reveal.initialize({
Presentations can be exported to PDF via a special print stylesheet. This feature requires that you use [Google Chrome](http://google.com/chrome) or [Chromium](https://www.chromium.org/Home) and to be serving the presention from a webserver.
Here's an example of an exported presentation that's been uploaded to SlideShare: http://www.slideshare.net/hakimel/revealjs-300.
+In order to enable PDF print capability in your presentation, the following code must be inserted in the HEAD section of your HTML document.
+
+'''html
+<!-- Printing and PDF exports -->
+<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>
+'''
+
Export dimensions are inferred from the configured [presentation size](#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.
1. Open your presentation with `print-pdf` included in the query string i.e. http://localhost:8000/?print-pdf#/. This triggers the default index HTML to load the PDF print stylesheet ([css/print/pdf.css](https://github.com/hakimel/reveal.js/blob/master/css/print/pdf.css)). You can test this with [lab.hakim.se/reveal-js?print-pdf](http://lab.hakim.se/reveal-js?print-pdf).