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

How convert the presentation of slidify in a pdf file? #18

Open
bluepill5 opened this issue Aug 29, 2013 · 15 comments
Open

How convert the presentation of slidify in a pdf file? #18

bluepill5 opened this issue Aug 29, 2013 · 15 comments

Comments

@bluepill5
Copy link

Hi, i'm start working wih slidify, my question is: How did you convert the .Rmd file in a .pdf file?

Thanks.

@lcolladotor
Copy link

Once you get a .md file you can use Pandoc http://johnmacfarlane.net/pandoc/ to get a pdf file. Also check the slidify documentation or browse the past issues https://github.com/ramnathv/slidify/issues?state=closed (someone might have asked that previously).

@bluepill5
Copy link
Author

Thanks, i'm gonna check.

@ramnathv
Copy link
Contributor

For the slides in this repo, you can directly use Google Chrome's print feature to save it as a PDF.

@bluepill5
Copy link
Author

Perfect, thank you so much for the help.

@khughitt
Copy link

Anyone know of a way to print with one slide per page? Currently Chrome ignores slide boundaries and prints as much as it can fit.

@Nowosad
Copy link

Nowosad commented May 10, 2014

The same problem here. Chrome is ignoring slides boundaries, and sometimes doesn't print slide titles, etc.

@ramnathv
Copy link
Contributor

There were some changes to Google Chrome, which broke the print styles for the slide framework being used here. I would recommend printing to PDF from Safari of Firefox. I tried it today and it seems to work well for me.

@khughitt
Copy link

👍 Firefox worked for me as well.

@rpietro
Copy link

rpietro commented Jul 27, 2014

Printing using pandoc certainly works well, specially since the yaml is nicely transformed into a title. But what I was trying to do was to get a pdf that would keep all the custom styling created through CSS. My ultimate goal is to have the presentation imported into slideshare.

I tried to use http://wkhtmltopdf.org/ , which works pretty well in converting local and online html-css into very nice looking pdf or images, but that didn't work for slidify (pdf or images). I then tried standalone and selfcontained, but still no results.

I wonder whether anybody might have been successful in uploading a slidify presentation in any format to slideshare.

thanks

@ramnathv
Copy link
Contributor

The best way to do this is to use the browsers print function. Firefox seems to give the best results retaining most of the styling. There is also an automated solution that uses casperjs to capture each slide as screenshot and convert them into a pdf.

@ptoche
Copy link

ptoche commented Jan 19, 2015

I'm getting no-where with Firefox/Chrome/Safari/Opera print functions. They print only the current slide and without any of the styles. I'm using html5slides, in case that matters. I'll try pandoc, but I thought I should let you know.

@juaneschutte
Copy link

Unfortunately, im also not winning with any of those major browsers, even if i use the io2012 framework.

@ptoche
Copy link

ptoche commented Feb 4, 2015

@juaneschutte , I've had more success with the io2012 framework and chrome (not tested with others).

There appear to be 2 problems: 1) the first, title page is messed up (only part of the title shows, not centered properly); 2) there is an empty white slide at the end (it's not numbered, so the problem is quite minor).

Here is my workflow:

  1. File --> Print
  2. Select 'Landscape' mode.
  3. Print using system dialog
  4. Select orientation (I forget which, but it makes a difference)
  5. Pages per sheet: 1 (other numbers resulted in slides being cut off)
  6. select the PDF button at the bottom left corner. This seems to be rather important.

The resulting PDF is available here for 28 days: http://www.fileconvoy.com/dfl.php?id=gbf535f69bcbe21aa999618530ff3fd43ada27bb5c

@ptoche
Copy link

ptoche commented Mar 1, 2016

Currently Firefox does a good job (it prints an extra blank page at the end, but otherwise fine), as long as you set the advanced printing options to landscape and remove headers, footers, and background colors. Chrome currently messes things up (in my case, it makes a mess of the title page and omits the second page, weird but true).

@NP-compete
Copy link

NP-compete commented Feb 25, 2018

On Mac OSX, this can be done using
Rscript -e "Sys.setenv(RSTUDIO_PANDOC='/Applications/RStudio.app/Contents/MacOS/pandoc');library(rmarkdown); library(utils); render('input.Rmd', 'pdf_document')"`

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

9 participants