Help us understand the problem. What is going on with this article?

reveal.jsで作った資料をChromeでPDF出力する方法

More than 5 years have passed since last update.

reveal.jsでの資料の作り方の説明はここではしない。

webサーバを起動して作った資料のurlをGoogle Chromeで開く。たとえば、ブラウザでプレゼンをするとき、http://localhost:8080/test-presentation/#というurlになるのであれば、PDF出力する際にはhttp://localhost:8080/test-presentation/?print-pdf/#というurlをまずChromeで表示する。print-pdfという文字列を挿入する必要がある理由は、index.htmlに以下の記述があるためである。

index.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 ) ? '../reveal.js/css/print/pdf.css' : '../reveal.js/css/print/paper.css';
  document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>

Chromeで開いたら、以下の操作によりPDF出力ができる。
1. Destinationの項目をSave as PDFに変更する。
2. Layoutの項目でLandscapeを選択する。
3. Marginsの項目でNoneを選択する。
4. Saveをクリックする。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした