Skip to content

Commit 2f54af4

Browse files
authored
update readme re: pdf exports hakimel#1823
1 parent 8b97ff3 commit 2f54af4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -847,10 +847,13 @@ Reveal.initialize({
847847
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.
848848
Here's an example of an exported presentation that's been uploaded to SlideShare: http://www.slideshare.net/hakimel/revealjs-300.
849849

850-
In order to enable PDF print capability in your presentation, the following code must be inserted in the HEAD section of your HTML document.
850+
### Page size
851+
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.
852+
853+
### Instructions
854+
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:
851855

852856
```html
853-
<!-- Printing and PDF exports -->
854857
<script>
855858
var link = document.createElement( 'link' );
856859
link.rel = 'stylesheet';
@@ -860,9 +863,7 @@ In order to enable PDF print capability in your presentation, the following code
860863
</script>
861864
```
862865

863-
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.
864-
865-
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).
866+
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).
866867
2. Open the in-browser print dialog (CTRL/CMD+P).
867868
3. Change the **Destination** setting to **Save as PDF**.
868869
4. Change the **Layout** to **Landscape**.

0 commit comments

Comments
 (0)