Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to PDF? #26

Open
dpsanders opened this issue Oct 2, 2019 · 5 comments
Open

Export to PDF? #26

dpsanders opened this issue Oct 2, 2019 · 5 comments

Comments

@dpsanders
Copy link

Is it possible to export the slides to PDF?
I guess maybe using Pandoc somehow.

@piever
Copy link
Owner

piever commented Oct 12, 2019

I haven't tested it, but you could try the recommendations from gnab/remark#50.

A summary of something that worked for me:

  1. Open in Chrome (I've actually used Chromium)
  2. Open Chrome DevTools (Ctrl+Shift+I on Linux, otherwise More Tools/Developer Tools on the menu)
  3. Toggle device toolbar (Ctrl+Shift+M on Linux)
  4. Print to file

I'm really not sure why it prints correctly only if one does step 2 and 3. When I have more time I can try and test command line solutions proposed in gnab/remark#50 and if they work include them in the docs.

@MPvHarmelen
Copy link

TLDR:

  1. Open in Firefox/Chrome
  2. Resize the window to make the slides fill the full width of the window. (This means that there is at least a little bit of space at the top and bottom of the slides.)
  3. Print to file (tip: choose a custom paper size with a 4:3 ratio)

The "print to file" also works in Firefox 71 on Ubuntu 18.04.
I noticed that you can skip steps 2 & 3 if you resize your browser window such that the slides fill the full width of the window (and there is some space at the top and bottom of the slides). I have no clue as to why this space is needed. When leaving the space at the top, though, all slides seem to be offset by that amount from the top of the pdf page, suggesting that the padding of the slides is also printed, which may be (part of) the cause of the slides not appearing when the space is on the sides.

@floswald
Copy link

floswald commented Mar 7, 2020

FWIW I've been using https://github.com/astefanutti/decktape for a long time now. It's really great.

@piever
Copy link
Owner

piever commented Mar 7, 2020

Looks interesting! Does it just work out of the box with Remark.jl as well? If that's the case, it would be great if you could PR an example to the README or post it here!

@pnavaro
Copy link

pnavaro commented Sep 2, 2020

For pdf export I use the R package pagedown

julia> using RCall
R> install.packages("pagedown")
R> pagedown::chrome_print("presentation/build/index.html")

Correction: But decktape is much better, sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants