rr-markdownknitrpagedown

knit pagedown html_resume to pdf with chrome_print produces error


I would like to produce an HTML and PDF version of a resume with pagedown::html_resume and pagedown::chrome_print.

I tried running the following code from the example provided by pagedown:

---
title: "Lijia Yu's resume"
author: Lijia Yu
date: "`r Sys.Date()`"
output:
  pagedown::html_resume:
    # set it to true for a self-contained HTML page but it'll take longer to render
    self_contained: false
knit: pagedown::chrome_print
---

Aside
================================================================================


![Lijia Yu](https://avatars1.githubusercontent.com/u/895125?s=400&v=4){width=80%}


Contact Info {#contact}
--------------------------------------------------------------------------------

- <i class="fa fa-envelope"></i> lijia.yu@outlook.com
- <i class="fa fa-github"></i> [github.com/yulijia](https://github.com/yulijia)
- <i class="fa fa-phone"></i> +1 000-000-0000
- For more information, please contact me via email.

But I receive this error:

Error in pagedown::chrome_print("/Users/Person/Documents/r/projects/Untitled.Rmd",  : 
  unused argument (encoding = "UTF-8")
Execution halted

If I comment out the line with chrome_print I don't get an error.

I tried updating Google Chrome to the latest version (79.0.3945.130) to no avail. I am using knitr version 1.25, pagedown version 0.5.3, and RStudio version 1.2.1335 on a Mac running Catalina 10.15.2.


Solution

  • When in doubt, try to update your packages. In your case, pagedown 0.5.3 is not the latest version. The encoding argument was added two months ago, and included in the latest CRAN release. So please try to install.packages('pagedown').