pagedown
Paginate the HTML Output of R Markdown with CSS for Print
The pagedown package enables you to create paginated PDF documents from R Markdown using CSS instead of LaTeX. You only need a modern web browser like Chrome or Edge to generate the PDFs.
The package provides multiple output formats including paged HTML documents, resumes, academic papers, posters, business cards, and letters. It solves the problem of PDF generation without requiring LaTeX installation, making it more accessible for users who want print-quality documents. The package builds on Paged.js and uses CSS for typesetting, giving you flexible styling options while maintaining a simple workflow within R Markdown.
Contributors#
Resources featuring pagedown#
Brad Lindblad | Professional Financial Reports with {rmarkdown} | Posit
GitHub: https://github.com/bradlindblad/pro_reports_talk
Abstract: With finance there will always be a need for reports, and as long as there’s a need for reports, there will be R users who want to create them as lazily as possible.
R Markdown lets us create incredibly customized and branded reports that can run automatically each month or day or whatever, and it all starts with the wonderful parameterizing features of R Markdown.
In this lightning talk, we will work through a practical example of creating an income statement for a group of theoretical office branches. You will learn how to make a parameterized R Markdown report, organize your R Markdown files and even create a custom cover letter, all in R.
Bio: Brad Lindblad is a data scientist located in Fargo, North Dakota. He is author of the tidyUSDA and schrute R packages, and specializes in geospatial data science and risk modeling. Brad is a frequent contributor to data science publications and loves creating new R users.
This is a meetup recording from December 2020. For more information on how to join meetups live: rstd.io/community-events
Links shared in the chat: Brad’s material/slides: https://github.com/bradlindblad/pro_reports_talk For anyone who’s new to R Markdown, this is a great reference guide and overview: https://bookdown.org/yihui/rmarkdown/ Pagedown package: https://github.com/rstudio/pagedown ETL example: https://solutions.rstudio.com/r/apps/twitter-etl/ More information on RStudio Connect: https://www.rstudio.com/products/connect/ To chat with RStudio about Connect: rstd.io/chat-with-rstudio
Christophe Dervieux | Business Reports with R Markdown | RStudio
Business Reports with R Markdown Presentation by Christophe Dervieux
As you share your analysis with business stakeholders across the company, how do you create the look and feel that they expect? This talk will cover theming of reports to fit with graphical guidelines: what can be done already, how that works with Powerpoint and Word, pagedown as another way to generate well-designed PDFs, and also how we plan to improve.
Christophe is a software engineer at RStudio. With an engineering background in economics and energy, he discovered R as an analyst then became a passionate R-admin supporting all R users and usage in his previous company. Longtime contributor for open-source R packages, he now works with Yihui to make the publication and reproducibility ecosystem with R Markdown better.
Christophe’s repo is here: https://github.com/cderv/meetup-2021-rmd-business-report Slides are here: https://meetup-rmd-style-business-report.meetup-rmd-style-business-report.netlify.app/

Yihui Xie | pagedown Creating beautiful PDFs with R Markdown and CSS | RStudio (2019)
The traditional way to beautiful PDFs is often through LaTeX or Word, but have you ever thought of printing a web page to PDF? Web technologies (HTML/CSS/JavaScript) are becoming more and more amazing. It is entirely possible to create high-quality PDFs through Google Chrome or Chromium now. Web pages are usually single-page documents, but they can be paginated thanks to the JavaScript library Paged.js, so that you can have elements like headers, footers, and page margins for the printing purpose. In this talk, we introduce a new R package, pagedown (https://github.com/rstudio/pagedown) , to create PDF documents based on R Markdown and Paged.js. Applications of pagedown includes, but not limited to, books, articles, posters, resumes, letters, and business cards. With the power of CSS and JavaScript, you can typeset your documents with amazing elegance (e.g., a single line of CSS, “tr:nth-child(even) { background: #eee; }”, will give you a striped table, and “border-radius: 50%;” gives you a circular element) and power (e.g., HTML Widgets).
VIEW MATERIALS https://bit.ly/pagedown