Skip to content
New course: Interactive Dashboards with Shiny. Get 50% off with coupon SHINYLAUNCH.
R for the Rest of Us Logo

Making Your Reports Shine: PDF Edition

This lesson is locked

Get access to all lessons in this course.

Transcript

Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.

Your Turn

Convert your report to pagedown

Learn More

To learn more about the pagedown package, check out the documentation (which is built, appropriately enough, as a pagedown document).

If you want to see the pagedown template made for the OMNI Institute, check out its documentation here.

Although I had trouble getting the chrome_print() function to work here, I have definitely gotten it to work! It is very helpful to knit slides made with the xaringan package (covered in an upcoming lesson) to PDF.

Have any questions? Put them below and we will help you out!

You need to be signed-in to comment on this post. Login.

Lucilla Piccari

Lucilla Piccari

May 30, 2021

Hello!

I have set mozilla as my default browser which I see is not supported on pagedown, but I found this paragraph in the documentation:

"If chrome_print() cannot find Chrome, Edge or Chromium automatically, set the PAGEDOWN_CHROME environment variable to the path to Chrome, Edge or Chromium executable."

I do have Edge (not Chrome), but I'm not sure I understand what I need to set where...

Thanks!

David Keyes

David Keyes

June 1, 2021

Could you try downloading Chrome and then running it again to see if that works? That would avoid having to change any environment variables etc.

Not sure what my issue is, but when trying to use pagedown I keep getting YAML errors like "Error in yaml::yaml.load(..., eval.expr = TRUE) : Scanner error: while scanning a simple key at line 6, column 1 could not find expected ':' at line 7, column 1" My code looks like this: title: "Week 12 Advanced RMD" author: "Elan Sykes" params: race_ethnicity: "Multiracial" schoolyear: "2018_2019" knit:pagedown::chrome_print output: pagedown:html_paged() toc: TRUE toc_depth: 1 fig_height: 10 fig_width: 8 df_print: kable

Can you post your full Rmd file as a gist and share the link?

JULIO VERA DE LEON

JULIO VERA DE LEON

May 10, 2022

Hi! I have Microsoft Edge installed, however I get:

The browser is not executable: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome Execution halted

I see that it is possible to write as an argument the kind of browser I have installed, but how can I add it here knit: pagedown::chrome_print?

Thanks!

Charlie Hadley

Charlie Hadley

May 11, 2022

Hello Julio,

I have a Windows 11 virtual machine that I tried using {pagedown} in but it did automatically discover Microsoft Edge and I wasn't able to replicate this issue. Is it possible for you to install Chrome on your machine as that is more than likely to allow you to successfully use {pagedown}?

Thanks,

Charlie