1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

remarkで作ったスライドをPDF出力する方法

Last updated at Posted at 2017-10-18

みなさんはremarkをご存知でしょうか?

こちらはMarkdownでスライドを生成できる便利なライブラリです。

このremarkで作ったスライドをPDFに出力する簡単な方法をご紹介しようと思います。

出力方法

remarkで作ったスライドをPDFにするとき、一番簡単そうなのはCSSに

@page {
  size: 1210px 681px;
  margin: 0;
}

@media print {
  .remark-slide-scaler {
    width: 100% !important;
    height: 100% !important;
    transform: scale(1) !important;
    top: 0 !important;
    left: 0 !important;
  }
}

を追加してchromeの印刷からPDF出力するという方法です。

4対3にしたいときはsize: 908px 681px;とすればOKです。

参考:Export to PDF · Issue #50 · gnab/remark

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?