Monday, February 26, 2024
 Popular · Latest · Hot · Upcoming
-2
rated 0 times [  2] [ 4]  / answers: 1 / hits: 12644  / 10 Years ago, fri, may 9, 2014, 12:00:00

I am trying to use the pdf export option of reveal.js as documented in the repo readme.



I have the following problems:




  • I don't see an option for layout (landscape vs portrait) in my chrome print window

  • Printing only ever prints the first slide



No idea what I've done wrong or how to troubleshoot it. I'm using the latest version of reveal.js css etc from Github (sha: 131c00689a4c7a18e5c991fc8102347e4594b5d4) on this example file.



I'm using Google-chrome Version 34.0.1847.132 on Ubuntu 14.04


More From » css

 Answers
5

  1. Remove



    <link rel=stylesheet media=print href=reveal.js/css/print/pdf.css />

  2. Add



    <!-- If the query includes 'print-pdf', include the PDF print sheet -->
    <script>
    if( window.location.search.match( /print-pdf/gi ) ) {
    var link = document.createElement( 'link' );
    link.rel = 'stylesheet';
    link.type = 'text/css';
    link.href = 'reveal.js/css/print/pdf.css';
    document.getElementsByTagName( 'head' )[0].appendChild( link );
    }
    </script>

  3. Add ?print-pdf to the end of URL, e.g. change .../index.html# to .../index.html?print-pdf#



[#45416] Thursday, May 8, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jericho

Total Points: 204
Total Questions: 98
Total Answers: 108

Location: Thailand
Member since Thu, Apr 22, 2021
3 Years ago
;