diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2017-02-14 14:42:22 +0100 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2017-02-14 14:42:22 +0100 |
commit | 909efab7dfa21374f5932b97de234b102b0e721e (patch) | |
tree | 68bb476b98cf9326b1a808ff24f2f9b445aeb8ee | |
parent | 5ad66f3779a7b26e43f899753a26ef5e3fe9667f (diff) | |
parent | bc1ca1a58a0233f2540ebfc3f71748ce8fffc1f9 (diff) | |
download | perl-software-in-gnu-guix-909efab7dfa21374f5932b97de234b102b0e721e.tar perl-software-in-gnu-guix-909efab7dfa21374f5932b97de234b102b0e721e.tar.gz |
fix readme conflict
-rw-r--r-- | README.md | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -852,9 +852,24 @@ 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. +### Page size 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). +### Print stylesheet +To enable the PDF print capability in your presentation, the special print stylesheet at [/css/print/pdf.css](https://github.com/hakimel/reveal.js/blob/master/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: + +```html +<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 +1. Open your presentation with `print-pdf` included in the query string i.e. http://localhost:8000/?print-pdf. You can test this with [lab.hakim.se/reveal-js?print-pdf](http://lab.hakim.se/reveal-js?print-pdf). * If you want to include [speaker notes](#speaker-notes) in your export, you can append `showNotes=true` to the query string: http://localhost:8000/?print-pdf&showNotes=true 1. Open the in-browser print dialog (CTRL/CMD+P). 1. Change the **Destination** setting to **Save as PDF**. |