Coder Social home page Coder Social logo

jhelvy / renderthis Goto Github PK

View Code? Open in Web Editor NEW
172.0 3.0 12.0 22.4 MB

An R package for building xaringan slides into multiple outputs, including html, pdf, png, gif, pptx, and mp4.

Home Page: https://jhelvy.github.io/renderthis

License: Other

R 3.01% HTML 96.99%
xaringan rstats slides pdf gif png mp4 quarto quartopub r

renderthis's Introduction

renderthis

R-CMD-check CRAN status Lifecycle: stable

This package contains functions for rendering R Markdown and Quarto documents — priamrily xaringan or revealjs slides — to different formats, including HTML, PDF, PNG, GIF, PPTX, and MP4, as well as a ‘social’ output, a png of the first slide re-sized for sharing on social media.

Looking for xaringanBuilder? The package formerly known as xaringanBuilder is now renderthis. If you need to install xaringanBuilder under the previous package name, see the instructions below.

Installation

Note: To get the most out of renderthis, we recommend installing the package with dependencies and making sure that you have a local installation of Google Chrome. See the Setup page for details.

You can install the latest version of renderthis from CRAN with:

install.packages("renderthis")

And the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("jhelvy/renderthis")

Some output formats require additional packages, and each format will provide instructions about how to install any missing dependencies. You can also choose to install renderthis with all of its dependencies:

# From CRAN
install.packages("renderthis", dependencies = TRUE)

# From GitHub
remotes::install_github("jhelvy/renderthis", dependencies = TRUE)

Usage

Use renderthis to render slides to different formats. Here is a diagram of the render hierarchy:

Rmd / qmd
 |
 |--> social (png, from Rmd only)
 |
 |--> html
       |
       |--> pdf
             |
             |--> png
                   |
                   |--> gif
                   |
                   |--> mp4
                   |
                   |--> pptx

To use renderthis, first load the package:

library(renderthis)

All of the package functions follow a common pattern:

  • All functions start with to_*() to render slides to a desired format (e.g., to_pdf()).
  • All functions have a required from argument which should be set to the full or local path to the input file.
  • All functions have an optional to argument. If provided, it can be a full or local path to the output file, and it must end in an appropriate extension (e.g. slides.gif for to_gif()). If it is not provided, the output file name will be determined based on the from argument.

Learn more about renderthis in the Get Started article.

Author and License Information

Citation Information

If you use this package in a publication, I would greatly appreciate it if you cited it. You can get the citation information by typing citation("renderthis") into R:

To cite renderthis in publications use:

Helveston, John Paul and Aden-Buie, Garrick (2021). renderthis: Render slides to different formats.

A BibTeX entry for LaTeX users is

@Manual{, title = {renderthis: Render slides to different formats.}, author = {{Helveston} and John Paul and {Aden-Buie} and {Garrick}}, year = {2021}, note = {R package version 0.0.1}, url = {https://jhelvy.github.io/renderthis/}, }

Installing xaringanBuilder

You can install the xaringanBuilder package as it was just prior to the name change with:

remotes::install_github("jhelvy/[email protected]")

Even though the install command mentions renderthis, the package will be installed as xaringanBuilder.

renderthis's People

Contributors

bisaloo avatar brshallo avatar evamaerey avatar gadenbuie avatar indrajeetpatil avatar jhelvy avatar liutiming avatar mcanouil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

renderthis's Issues

Getting Error on Missing PNG when trying to generate a PDF

Hello,

I'm running the latest versions of R and Rstudio on Arch-derived Garuda Linux. I'm also running the latest version of Google Chrome.

I want to output PDF from my Xaringen slides (I can see the HTML just fine).

But I get the following error on a specific slide.

> xaringanBuilder::build_pdf("Presentations/USC2021/statepolarization_2021.Rmd")
✓ Building Presentations/USC2021/statepolarization_2021.Rmd into Presentations/USC2021/statepolarization_2021.html ... done
x Building Presentations/USC2021/statepolarization_2021.html into Presentations/USC2021/statepolarization_2021.pdf ... failed
Error in force(expr) : 
  Failed to generate output. Reason: Failed to open http://127.0.0.1:7799/Plots/Legislatures_2021/States/legislatures_party_density.png (HTTP status code: 404)

It seems like it is trying to open a file on a web server? Why? I have the plot in my file system.

I can see the presentation perfectly in the Moon Reader and when I open the html presentation in Chrome.

Interestingly, when I try to print the presentation from Chrome itself, it is missing several plots, including the one that xaringanBuilder complains about. Here's the screenshot of what I mean. Notice that the PDF preview is missing that plot, when the underlying HTML display in Chrome looks fine.

image

Error messages format

Hi!

First of all, congratulations for this release. This package has all the xaringan related functions I've been wanting for.

I just have a suggestion regarding the format of the error messages. I guess some of them are quite easy to understand for developers but they may not be to the wide public to which I'm sure this package is aimed.

In my first contact with the package I tried to compile the template obtained from xaringanthemer to PDF.

> library(xaringanBuilder)
> build_pdf("myslides.html")
✓ Building slides.pdf from slides.html ... done
Error in pagedown::chrome_print(input = input, output = output_file) : 
  The browser is not executable: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

The error was obviously because I didn't have Google Chrome installed. Maybe a message indicating that this browser must be installed should be given.

I installed it and then get:

> build_pdf("myslides.html")
✓ Building slides.pdf from slides.html ... done
Error in is_remote_protocol_ok(debug_port, verbose = verbose) : 
  Cannot find headless Chrome after 20 attempts

I was executing the code before opening Google Chrome (again, if this is necessary maybe it should be shown in a message). After opening Google Chrome I executed the code again. The slides were correct but I got an error though (which this time I could not understand).

> build_pdf("myslides.html")
✓ Building slides.pdf from slides.html ... done
[2021-02-18 09:58:56] [error] handle_read_frame error: asio.system:54 (Connection reset by peer)

One of the slides runs out of the frame (it also does in the html version). May that be the reason?

Input and output name mismatches cause errors in output chains

If the requested output file name sans extension doesn't match the input file name without the extension, errors can arise when intermediate formats need to be generated.

library(xaringanBuilder)
build_png(
    input = "https://jhelvy.github.io/xaringanBuilder/reference/figures/slides.html", 
    output_file = "test.png"
)
#> ℹ Building test.pdf from slides.html
#> ✓ Building test.pdf from slides.html ... done
#> 
#> ℹ Building test.png from slides.pdf
#> Error in normalizePath(pdf, mustWork = TRUE): path[1]="/private/var/folders/zw/8z2vpz1s0cl3gwpyh5p72mwh0000gn/T/Rtmp3nVWkK/reprex-2a9162281673-deep-polyp/slides.pdf": No such file or directory

Here build_png() uses slides.html to build test.pdf (since we are going wanting to generate test.png), but later looks for slides.pdf when converting from PDF to png.

`assert_chrome_installed()` could give better advice

As pointed out by @yyzeng in this comment

The underlied chromote::find_chrome() just CAN'T find chrome.exe's path in my computer, but I have checked and found the path is in the Register with key "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe\\", 😭 So, I have to set Sys.setenv("CHROMOTE_CHROME" = "C:\\Users\\admin\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe") before using xaringanBuilder::build_pdf("Test.Rmd"), then everything is ok.)

we could add some advice about setting the CHROMOTE_CHROME env variable if Chrome is installed but not found by chromote::find_chrome(). I guess this is something that should be handled by chromote::find_chrome(), but we use our own error message since the underlying error isn't very user friendly.

Our current error message reads

Error: This function requires a local installation of the Chrome browser. 
  You can also use other browsers based on Chromium, such as Chromium itself, 
  Edge, Vivaldi, Brave, or Opera.

Improved documentation

I'm starting this issue just to brainstorm some ideas for improving the package documentation.

One way to structure the documentation is to essentially move a lot of what is in the main readme file to separate articles. Perhaps these articles:

  • Installation: I think a separate page on this might be nice since the chrome requirement is easy to miss. 
  • Compile slides to an HTML page: This would just be build_html(). It probably doesn't need it's own page, but I don't konw where else to put it.
  • Build slides to a PDF: PDF is probably the most common output type, plus the complex / partial slides bit could be explained here in detail.
  • Get PNGs of all or select slides: This would include build_png() and build_social(). Examples could include building from a {xaringan} deck (the .Rmd file) as well as perhaps building from a PDF of a .pptx file.
  • Animate your slides as a GIF or MP4: This would include build_gif() and build_mp4(). Again, could show examples of building from the .Rmd file or a PDF of a .pptx file.
  • Convert your slides to a PPTX: This would include build_pptx().

Error in sink(con, split = debug) : sink stack is full

I was only able to run this once and now I continue to get the same error, even after restarting R and clearing output. I've also tried the following with no progress being made:

sink()
Warning message:
In sink() : no sink to remove

`find_chrome()` might return `TRUE` by accident

From CRAN https://www.r-project.org/nosvn/R.check/r-oldrel-macos-x86_64/renderthis-00check.html

checking tests ... [26s/56s] ERROR
  Running ‘testthat.R’ [26s/56s]
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
  Caused by error in `chain_call(c_processx_exec, command, c(command, args), pty, pty_options, ...`:
  ! cannot start processx process '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' (system error 2, No such file or directory) @unix/processx.c:613 (processx_exec)
  Backtrace:
      ▆
   1. ├─base::suppressMessages(to_social("slides.Rmd")) at test-social.R:9:4
   2. │ └─base::withCallingHandlers(...)
   3. └─renderthis::to_social("slides.Rmd")
   4. └─base::tryCatch(...)
   5. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   6. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   7. └─value[[3L]](cond)
  
  [ FAIL 12 | WARN 2 | SKIP 1 | PASS 117 ]
  Error: Test failures
  Execution halted

Error when converting html file to powerpoint using xaringanBuilder

Am trying to convert my html file into powerpoint presentation but I get this error.
Here is my code and error

library(xaringanBuilder)
build_pptx("Rmarkdown/My_first_paper_presentation_final.html", output_file = "Rmarkdown/Pow/First_paper.pptx", slides = "all", complex_slides = TRUE, delay = 1)

Error: 'format_inline' is not an exported object from 'namespace:cli'

Time out error

Hi, when building to pdf from HTML, I got these errors

xaringanBuilder::build_pdf('xxx.html', complex_slides = T, partial_slides = T)
Error: Chromote: timed out waiting for response to command Target.createTarget

And sometimes

Error: Chromote: timed out waiting for event Page.loadEventFired

I'm wondering what may cause this and how may I prevent it?

Thank you!

Rendering quarto presentation to pdf from html leaves (mostly) blank page when `notes` exist

Hi,

I think this may be completely intentional, but I noticed that when there is a speaker note on a slide, the slide gets split into 2 pages when saved to pdf with renderthis::to_pdf().

For example, slide 1 below gets split into pages 2 and 3 in the pdf (after the title slide on page 1), while slide 2 is, as expected, only on page 4.

---
title: "test"
format: revealjs
---

## slide 1

![](https://allisonhorst.github.io/palmerpenguins/reference/figures/README-flipper-bill-1.png)

::: notes
-   secret note
:::

## slide 2

![](https://allisonhorst.github.io/palmerpenguins/reference/figures/README-flipper-bill-1.png)
renderthis::to_pdf("test.html")

I don't think I can insert the html into this PR, but here's the resulting pdf.

Add `resize_images()` function

Based on this tweet thread, it would be helpful to be able to batch resize all of the images used in making xaringan slides to reduce the final file size of the PDF from build_pdf() or any of the other build_* functions. This should probably be implemented at the .Rmd level and maybe parse through the .Rmd file to look for all image types that can be resized. Template I'm thinking for the function is:

resize_images <- function(input, max_size = 1, image_types = c("png", "jpeg", "jpg") {}

Where max_size is the max image file size in MB, and image_types is the vector containing all image types to search for (the user can add more if they want).

Christophe Dervieux gave some suggestions in the tweet for how to do the resizing:

Optipng can be used to optimize image size. There is a hook: https://bookdown.org/yihui/rmarkdown-cookbook/optipng.html
But also xfun::optipng() https://rdrr.io/cran/xfun/man/optipng.html
They can also be compressed if needed and the new tinyfy() can help: https://rdrr.io/cran/xfun/man/tinify.html

Don't use absolute paths or `output_dir` when rendering from Rmd

It's a bit of a quirk of rmarkdown::render(), but using an absolute path in output_file or using output_dir can cause problems that are often not easily apparent until working in an environment where relative paths are required. In particular, using either of the above will cause rmarkdown::render() to write figure outputs using absolute file paths. This becomes an issue when an HTML file is served to a browser where the paths need to be relative.

Here's a reprex that demonstrates the issue:

# disable the imgur uploading in {reprex}
knitr::opts_knit$set("upload.fun" = identity)

library(xaringanBuilder)

# A minimal slide document with a single plot
cat(
  "---",
  "output: xaringan::moon_reader",
  "---",
  "",
  "```{r}",
  "plot(faithful)",
  "```",
  sep = "\n",
  file = "demo.Rmd"
)

build_pdf("demo.Rmd")
#> ℹ Building demo.html from demo.Rmd
#> ℹ Building demo.pdf from demo.html
#> Error in force(expr): Failed to generate output. Reason: Failed to open http://127.0.0.1:7737/private/var/folders/zw/8z2vpz1s0cl3gwpyh5p72mwh0000gn/T/Rtmp3nVWkK/reprex-2a9138331d3c-fussy-agama/demo_files/figure-html/unnamed-chunk-3-1.png (HTTP status code: 404)
#> ✓ Building demo.pdf from demo.html ... done
#> 
#> ℹ Building demo.html from demo.Rmd✓ Building demo.html from demo.Rmd ... done

html <- readLines("demo.html")

grep("figure-html", html, value = TRUE)
#> [1] "![](/private/var/folders/zw/8z2vpz1s0cl3gwpyh5p72mwh0000gn/T/Rtmp3nVWkK/reprex-2a9138331d3c-fussy-agama/demo_files/figure-html/unnamed-chunk-3-1.png)&lt;!-- --&gt;"

The image link points to the full absolute file path of the the rendered plot, but the absolute path can't be found once the page is being served to a browser. (Notice the link starts with /private/var/....)

Instead we need the relative URL, e.g. demo_fies/figure-html/unnamed-chunk-3-1.png.

If we need to be able to support rendering the HTML with an output file in a different folder, it's best to move into the folder containing input.Rmd, render the file to a temporary file (in that folder), and then move the temp file to a new folder. Except in the case of xaringan, this is likely to fail without a bunch more work, unless the slides are self_contained: true.

In light of the above, I'd recommend temporarily moving into the directory containing the input file before calling rmarkdown::render() and giving just the basename(output_file) to the output_file argument.

Remove pdftools dependency

The following line inside build_pdf_complex() is the only time the pdftools library is used:

pdftools::pdf_combine(pdf_files, output = output_file)

There's probably a way to combine pdf files with pagedown::chrome_print() or something else that is already widely used in the package.

new package / new package name?

I'm starting to tinker with quarto revealjs presentations, and they're pretty slick. It also got me thinking more about what {xaringanBuilder} actually does, and I'm realizing that it can be used for much more than just xaringan presentations. Other than the few xaringan-specific functions where it takes the .Rmd file as the input (e.g., build_social()), all the other functionality works for revealjs presentations. I also use it all the time to convert pdfs into png files to share individual slides or to make a thumbnail for a video, etc.

With this in mind, I was thinking perhaps we should consider re-naming it, or just start a new package based on {xaringanBuilder} that has a broader purpose? Something that users of xaringan, revealjs, etc. could all use to renders their presentations (and other media) to different formats?

I was checking names, and both {buildr} and {printr} already exist on CRAN. But {build} and {render} are both available. I was thinking of simplifying the function names to just be the output type, so if you changed the package name it'd look something like this in use:

  • build::pdf(), build::png(), build::html()
  • render::pdf(), render::png(), render::html()

My preference is for a verb package name, like {build} since it has the same feel of the current functions (e.g., build::pdf() instead of xaringanBuilder::build_pdf()). It's also so much easier to type...{xaringanBuilder} is kind of an annoyingly long name.

Thoughts?

Add `rstudio/chromote` to dependency?

chromote is used and I need to set CHROMOTE_CHROME and PAGEDOWN_CHROME for build_pdf() to work. Perhaps add it to dependency? Also mention the PATH setting so user won't have to install chrome (chromium, edge, etc. will work).

build_pdf onlyprinting the first slide?

It may well be me messing up something obvious, but I seem to have a problem in printing my slides with build_pdf. The Rmd file compiles just fine onto html and is published here.

When I try to print it to pdf using build_pdf I get a weird result that the process seems to work fine, but only the title page and the first part of the first slide are printed. The resulting pdf does have 11 pages (that's as many as there are full slides on the html file), but basically all pages from 2 to 11 show the same (half of what should be slide 2).

I've installed the current version of xaringanBuilder from this repo and I think I have all the relevant pre-requisites. I'm on Ubuntu 20.04 (but this should not be a problem) and of course I do have Google Chrome installed.

Any obvious point I'm missing?
Thanks!

Release renderthis 0.1.0

First release:

  • usethis::use_cran_comments()
  • Proof read Title: and Description:
  • Check that all exported functions have @returns and @examples
  • Check that Authors@R: includes a copyright holder (role 'cph')
  • Check licensing of included files
  • Review https://github.com/DavisVaughan/extrachecks
  • Use CRAN versions of previously GitHub-only packages
  • Slim down inst/examples and render examples as part of pkgdown workflow?

Prepare for release:

  • devtools::build_readme()
  • urlchecker::url_check()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • rhub::check_for_cran()
  • Review pkgdown reference index for, e.g., missing topics
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • Update install instructions in README
  • Finish blog post
  • Tweet
  • Add link to blog post in pkgdown news menu

Warning: A runtime exception has occured while executing JavaScript

Hello John,
Thank you so much for making xaringanBuilder. It has been a great help to me and my students. I am having a problem with it building a slide deck. Can I do anything to fix the warning/exception/problem shown below?

The issue:

Warning: A runtime exception has occured while executing JavaScript
  Runtime exception message:
    ReferenceError: $ is not defined
    at http://127.0.0.1:6101/X_files/kePrint-0.0.1/kePrint.js:1:1

The code

xaringanBuilder::build_pdf("./X.Rmd")

The Rmd file

---
title: "Bug"
output:
  xaringan::moon_reader
---

```{r packages}
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(kableExtra))
```


```{r, echo=FALSE}
datasets::anscombe %>% 
  select(x1, y1, x2, y2, x3, y3, x4, y4) %>% 
  kbl(col.names = rep(c("x", "y"), 4), align='c') %>% 
  add_header_above(c("Group 1" = 2, "Group 2" = 2, "Group 3" = 2, "Group 4" = 2))
```

Session info

─ Session info  🤦🏽  💪🏻  🕜   ─────────────────────────────────────────────────────────────────────────────────────────────────
 hash: person facepalming: medium skin tone, flexed biceps: light skin tone, one-thirty

 setting  value
 version  R version 4.1.0 (2021-05-18)
 os       macOS Big Sur 11.6.2
 system   x86_64, darwin17.0
 ui       RStudio
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/New_York
 date     2022-01-05
 rstudio  2021.09.1+372 Ghost Orchid (desktop)
 pandoc   2.14.0.3 @ /Applications/RStudio.app/Contents/MacOS/pandoc/ (via rmarkdown)

─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package         * version date (UTC) lib source
 assertthat        0.2.1   2019-03-21 [1] CRAN (R 4.1.0)
 cachem            1.0.6   2021-08-19 [1] CRAN (R 4.1.0)
 callr             3.7.0   2021-04-20 [1] CRAN (R 4.1.0)
 cli               3.1.0   2021-10-27 [1] CRAN (R 4.1.0)
 colorspace        2.0-2   2021-06-24 [1] CRAN (R 4.1.0)
 crayon            1.4.2   2021-10-29 [1] CRAN (R 4.1.0)
 DBI               1.1.1   2021-01-15 [1] CRAN (R 4.1.0)
 desc              1.4.0   2021-09-28 [1] CRAN (R 4.1.0)
 devtools        * 2.4.3   2021-11-30 [1] CRAN (R 4.1.0)
 digest            0.6.29  2021-12-01 [1] CRAN (R 4.1.0)
 dplyr           * 1.0.7   2021-06-18 [1] CRAN (R 4.1.0)
 ellipsis          0.3.2   2021-04-29 [1] CRAN (R 4.1.0)
 evaluate          0.14    2019-05-28 [1] CRAN (R 4.1.0)
 fansi             0.5.0   2021-05-25 [1] CRAN (R 4.1.0)
 fastmap           1.1.0   2021-01-25 [1] CRAN (R 4.1.0)
 fs                1.5.2   2021-12-08 [1] CRAN (R 4.1.0)
 generics          0.1.1   2021-10-25 [1] CRAN (R 4.1.0)
 glue              1.6.0   2021-12-17 [1] CRAN (R 4.1.0)
 htmltools         0.5.2   2021-08-25 [1] CRAN (R 4.1.0)
 httr              1.4.2   2020-07-20 [1] CRAN (R 4.1.0)
 kableExtra      * 1.3.4   2021-02-20 [1] CRAN (R 4.1.0)
 knitr           * 1.37    2021-12-16 [1] CRAN (R 4.1.0)
 lifecycle         1.0.1   2021-09-24 [1] CRAN (R 4.1.0)
 magrittr          2.0.1   2020-11-17 [1] CRAN (R 4.1.0)
 memoise           2.0.1   2021-11-26 [1] CRAN (R 4.1.0)
 munsell           0.5.0   2018-06-12 [1] CRAN (R 4.1.0)
 pillar            1.6.4   2021-10-18 [1] CRAN (R 4.1.0)
 pkgbuild          1.2.1   2021-11-30 [1] CRAN (R 4.1.0)
 pkgconfig         2.0.3   2019-09-22 [1] CRAN (R 4.1.0)
 pkgload           1.2.4   2021-11-30 [1] CRAN (R 4.1.0)
 prettyunits       1.1.1   2020-01-24 [1] CRAN (R 4.1.0)
 processx          3.5.2   2021-04-30 [1] CRAN (R 4.1.0)
 ps                1.6.0   2021-02-28 [1] CRAN (R 4.1.0)
 purrr             0.3.4   2020-04-17 [1] CRAN (R 4.1.0)
 R6                2.5.1   2021-08-19 [1] CRAN (R 4.1.0)
 remotes           2.4.2   2021-11-30 [1] CRAN (R 4.1.0)
 rlang             0.4.12  2021-10-18 [1] CRAN (R 4.1.0)
 rmarkdown         2.11    2021-09-14 [1] CRAN (R 4.1.0)
 rprojroot         2.0.2   2020-11-15 [1] CRAN (R 4.1.0)
 rstudioapi        0.13    2020-11-12 [1] CRAN (R 4.1.0)
 rvest             1.0.2   2021-10-16 [1] CRAN (R 4.1.0)
 scales            1.1.1   2020-05-11 [1] CRAN (R 4.1.0)
 sessioninfo       1.2.1   2021-11-02 [1] CRAN (R 4.1.0)
 stringi           1.7.6   2021-11-29 [1] CRAN (R 4.1.0)
 stringr           1.4.0   2019-02-10 [1] CRAN (R 4.1.0)
 svglite           2.0.0   2021-02-20 [1] CRAN (R 4.1.0)
 systemfonts       1.0.3   2021-10-13 [1] CRAN (R 4.1.0)
 testthat        * 3.1.1   2021-12-03 [1] CRAN (R 4.1.0)
 tibble            3.1.6   2021-11-07 [1] CRAN (R 4.1.0)
 tidyselect        1.1.1   2021-04-30 [1] CRAN (R 4.1.0)
 usethis         * 2.1.3   2021-10-27 [1] CRAN (R 4.1.0)
 utf8              1.2.2   2021-07-24 [1] CRAN (R 4.1.0)
 vctrs             0.3.8   2021-04-29 [1] CRAN (R 4.1.0)
 viridisLite       0.4.0   2021-04-13 [1] CRAN (R 4.1.0)
 webshot           0.5.2   2019-11-22 [1] CRAN (R 4.1.0)
 withr             2.4.3   2021-11-30 [1] CRAN (R 4.1.0)
 xaringanBuilder * 0.0.9   2021-11-27 [1] Github (jhelvy/xaringanBuilder@235c8c4)
 xfun              0.29    2021-12-14 [1] CRAN (R 4.1.0)
 xml2              1.3.3   2021-11-30 [1] CRAN (R 4.1.0)

 [1] /Library/Frameworks/R.framework/Versions/4.1/Resources/library

Can't print local image?

Hi there,
I may be missing something obvious, but I seem to have a slight problem with printing to pdf. I have a relatively simple set of slides, which I can compile to html (full repo here).
I have used

xaringanBuilder::build_pdf("HoD-FF.html")

but you can see how the logo on the left-bottom corner of the slides is just not printed. Interestingly, it does work when I do

xaringanBuilder::build_pdf("HoD-FF.Rmd")

I don't think building the pdf from the original Rmd or the compiled html makes any difference (I've tried both). I've also tried to print directly from Chrome, but the same thing happens. Also, I've tried to compile to a self-contained html, but it seems like the local image assets/logo.png (which is placed on the left-bottom corner, together with some text) doesn't show...

Is there anything obviously wrong that I'm just not seeing?
Thanks!
Gianluca

Error in force(expr) : Failed to generate output in 30 seconds (timeout).

Hello!

I try to render a simple xaringan presentation:

---
title: "Example"
output: 
  xaringan::moon_reader:
    mathjax: "https://cdn.bootcss.com/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_HTMLorMML"
---

# Introduction

with the this code:

renderthis::to_pdf(from = "example.Rmd",
                   to = "example.pdf")

but I keep receiving an error:

(¬_¬)renderthis::to_pdf(from = "example.Rmd",
...                    to = "example.pdf")
✔ Rendering example.Rmd into example.html ... done
✖ Rendering example.html into example.pdf ... failed
Error in force(expr) : Failed to generate output in 30 seconds (timeout).

However, if I remove:

    mathjax: "https://cdn.bootcss.com/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_HTMLorMML"

it works:

(¬_¬)renderthis::to_pdf(from = "example.Rmd",
...                    to = "example.pdf")
✔ Rendering example.Rmd into example.html ... doneRendering example.html into example.pdf ... done

Deprecate `build_*()` functions

renderthis currently is a clean break from the build_* naming convention of xaringanBuilder. We probably want to instead gracefully deprecate the function names (lifecycle stages: deprecated).

This will also help us avoid internal errors if we happen to mention a build_* function somewhere that we haven't migrated yet.

Praise 🎉

Do you find this package useful? Got any cool examples of how you've used it? Let me know by posting a comment here 😁!

Provide user control over overwriting behavior

I would appreciate it if there were a way to have a little more control over the overwriting behavior of the build_*() functions. Currently, files are overwritten without any warning or confirmation and there's no way to turn that feature off. This always makes me nervous, especially when it's possible to call a build_*() function from the wrong directory and create unexpected files that unintentionally overwrite files in the wrong location.

It'd be good to at minimum have a way to set overwrite = FALSE even if the default value were TRUE for ergonomic reasons.

Issue with google font

Hello, I am trying to use renderthis::to_pdf but I am getting an error related to a google font I am using. I have searched online but have no idea how to fix this. Any help appreciated. Thank you

I am using Rstudio in a Mac OS Monterrey. This is a slide deck made in R markdown using the xaringan package.

> renderthis::to_pdf("07_TheNormalDistribution_II.Rmd") ✔ Rendering 07_TheNormalDistribution_II.Rmd into 07_TheNormalDistribution_II.htm… ✖ Rendering 07_TheNormalDistribution_II.html into 07_TheNormalDistribution_II.pd… Error in force(expr) : Failed to generate output. Reason: Failed to open https://fonts.googleapis.com/css?family=EB+Garamond:300,300i&display=swap (HTTP status code: 400)

Integrate `xaringan_to_pdf()` into existing UI

xaringan_to_pdf() looks pretty good now after PR #2 .

Now I'm wondering if we should modify the UI and / or function name to make it more consistent with the existing UI. For example, we could add an argument to build_pdf() and build_gif() (something like complex = TRUE) that defines if the slides are "complex" (e.g. has panel sets), and if so it uses xaringan_to_pdf() to create the pdf from the html file.

If we went with that design, I was thinking of creating two internal functions:

  • build_pdf_simple(): uses pagedown::chrome_print() to build the pdf (just like how build_pdf() works now).
  • build_pdf_complex(): uses xaringan_to_pdf() to print (I'd probably just rename xaringan_to_pdf() to build_pdf_complex()).

With this UI, the user could still use build_pdf() or build_gif() but could have more control over how they want the pdf / gif built. I would also add the argument include_partial_slides argument to build_pdf() and build_gif() as well since that would be passed on to build_pdf_complex().

@gadenbuie what do you think?

Picure does not print in PDF if the size exceed the silde

Here is a minimal example. It applies to any picture as far as I am aware of. This is a problem especially when using pictures with large white margins, It is hard to tell whether it exceeds the edge of the slide by eye.

---
title: 'cat'
subtitle: ''
author: ''
date:  ''
output:
  xaringan::moon_reader:
    lib_dir: libs
    self-contain: true
    nature:
      highlightStyle: github
      slideNumberFormat: ''
      highlightLines: true
      countIncrementalSlides: false
      ratio: '16:9'
---

# Normal size cat

<img src="p1.png" width="57%" class="center" align=""/>

---

# Large cat

<img src="p1.png" width="100%" class="center" align=""/>

Result HTML from bulid_html

image

image

Result PDF from bulid_pdf

image

Error in magick_image_readpath(path, density, depth, strip, defines)

Thanks so much for this awesome package!

command and output:

> build_pptx("test.Rmd")
v Building test.html from test....
v Building test.pdf from test.h...
[2021-02-12 18:27:00] [error] handle_read_frame error: asio.system:10054 (An existing connection was forcibly closed by the remote host.)
v Building test.pptx from test....
Error in magick_image_readpath(path, density, depth, strip, defines) : 
  rsession.exe: FailedToExecuteCommand `"gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72"  "-sOutputFile=C:/Users/timing/AppData/Local/Temp/Rtmpo36Yun/magick-tetLqr9tDeXlqYGf9Fen6MYHRjIDzts1%d" "-fC:/Users/timing/AppData/Local/Temp/Rtmpo36Yun/magick-5fAO1_6eb5-YjUqFdClwzzvkRMrL1COC" "-fC:/Users/timing/AppData/Local/Temp/Rtmpo36Yun/magick-08ou7S3AZwo3k5y2OBobsrzHMRlZeaJP"' (The system cannot find the file specified.
) @ error/delegate.c/ExternalDelegateCommand/457

R markdown file:

---
title: "Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
author: "Yihui Xie"
institute: "RStudio, PBC"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output:
  xaringan::moon_reader:
    lib_dir: libs
    nature:
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: false
---

background-image: url(https://upload.wikimedia.org/wikipedia/commons/b/be/Sharingan_triple.svg)
sessionInfo:

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252 
[2] LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    
system code page: 936

attached base packages:
[1] stats     graphics  grDevices utils     datasets 
[6] methods   base     

other attached packages:
[1] xaringanBuilder_0.0.4.9000

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.6        rstudioapi_0.11   knitr_1.31       
 [4] servr_0.21        xml2_1.3.2        magrittr_2.0.1   
 [7] uuid_0.1-4        R6_2.5.0          rlang_0.4.10     
[10] stringr_1.4.0     tools_4.0.3       websocket_1.3.1  
[13] packrat_0.5.0     xfun_0.20         xaringan_0.19.2  
[16] cli_2.3.0         htmltools_0.5.1.1 yaml_2.2.1       
[19] digest_0.6.27     assertthat_0.2.1  processx_3.4.5   
[22] zip_2.1.1         later_1.1.0.1     officer_0.3.16   
[25] ps_1.5.0          promises_1.1.1    fs_1.5.0         
[28] mime_0.9          glue_1.4.2        evaluate_0.14    
[31] rmarkdown_2.6.6   stringi_1.5.3     compiler_4.0.3   
[34] magick_2.6.0      jsonlite_1.7.2    httpuv_1.5.5     
[37] pagedown_0.13    

CRAN check failure: package 'quarto' but has not declared a SystemRequirements

We got notified from CRAN that we have several check failures:

Please see the problems shown on https://cran.r-project.org/web/checks/check_results_renderthis.html.
Please correct before 2023-10-19 to safely retain your package on CRAN.

A follow up email suggests that it has to do with the Quarto installation on CRAN:

The new check failures are because CRAN was requested to install Quarto. Your package makes use of it via package 'quarto' but has not declared a SystemRequirements (and quarto passes its checks with or without quarto-cli).

complex_slides getting stuck?

Hi all,
I may be doing something wrong, but I seem to have a slight issue with complex_slides. All seems to work OK when I set it to FALSE. However, when I try to set it to TRUE because my presentation contains panelsets, the resulting pdf gets "stuck" on one of the first few slides. It creates many pdf pages, but they are all the same as the last "valid" one.

For example, I have this presentation, which contains panelsets. If I run

xaringanBuilder::build_pdf(
   "https://gianluca.statistica.it/slides/armitage/seminar/index.html",
   complex_slides = TRUE,output_file = "test.pdf"
)

the resulting pdf does the title slide and the first slide OK, but then every other slide is a replica of slide 2.

If I don't add the options about complex_slides or partial_slides, then the pdf is compiled OK with all the pages (although, the panelsets of course don't work well as only the first panel is included...).

I do have Chrome installed and updated (though it's not my default browser) --- so am I missing something obvious? Or can people not replicate my problem and manage to print the pdf of the slides above OK?

Thanks
Gianluca

Can't render a qmd presentation

Hi all,
I have a qmd/revealjs presentation, but I have customised the theme and have created a template. The slides compile perfectly, but when I try to pdf them using renderthis I get a message

Error in to_pdf_complex(path_from(step_html, "url"), output_file, partial_slides,  : 
  Input does not appear to be xaringan or quarto slides:

I think this gets triggered by the check in

has_remark <- b$Runtime$evaluate("typeof slideshow !== 'undefined'")$result$value
  if (!has_remark) {
    stop("Input does not appear to be xaringan or quarto slides: ", input)
  }

Not sure how to deal with this though...

I'm testing this on a html file output by quarto both locally and deployed online (https://giabaio.github.io/test-quarto). Sorry if I'm missing an obvious point!

Thanks for your help!
Gianluca

Feature Request: Rendering specific slide in a ratio that is suitable for shared card image

Hi!

Following @gadenbuie advice I open this issue as a feature request:
Originally posted by @uriahf in gadenbuie/garrickadenbuie-com#115 (comment)

I want to render specific slides as an image for my social cards, @gadenbuie explained how to do it in his blog post but this solution works only for the first slide of the presentation.

I made a small workaround:
I created a new presentation that contains only the desired slide but with the ratio: 191:100 and then I used the code from the mentioned blog post:

https://github.com/uriahf/nb_step_by_step/blob/master/render_image_for_social_card.Rmd

It might be really useful to have a function for that :)

Recent updates in Chrome break print to pdf?

I may be, as always, missing something obvious. But I think has a recent Chrome update broken to_pdf... When I use the latest Chrome release (Version: 108.0.5359.124-1), doing

renderthis::to_pdf("RMD_File",...)

produces a weird result, with some slides scaled down (with much smaller fonts) and others looking OK.

I have tested by reverting to version 107.0.5304.121-1 (I'm on Ubuntu 20.04) and it seems like renderthis::to_pdf prints the xaringan slides nicely...

I don't think it depends on the actual underlying xaringan file (I've tested with a couple of examples) and the latest Chrome release fails, while the downgraded version works...

Folder usage returns folder does not exist

When running the command:
build_pdf("R/my_slides.Rmd", complex_slides=TRUE)

The error occurs:
The directory "R" does not exist

This feedback is incorrect and there is no further feedback to this...

Building PDFs: net::ERR_ABORTED

I'm having trouble building PDF slides.

  • Ubuntu 22.04
  • R 4.2
  • Tried multiple files, same error
  • It works first time on my colleagues' laptops; except they are using Ubuntu 20.04
  • Not sure what else to provide (I know, vague bug, sorry)
❯ xaringanBuilder::build_pdf("chapter1.Rmd")
✔ Building chapter1.Rmd into chapter1.html ... done
✖ Building chapter1.html into chapter1.pdf ... failed
Error in force(expr) : 
  Failed to generate output. Reason: net::ERR_ABORTED
Run `rlang::last_error()` to see where the error occurred.
✖ [77-support-building-slides-to-pdf*]
❯ last_error()
<error/rlang_error>
Error:
! Failed to generate output. Reason: net::ERR_ABORTED
Caused by error in `force()`:
! Failed to generate output. Reason: net::ERR_ABORTED
---
Backtrace:
 1. xaringanBuilder::build_pdf("chapter1.Rmd")
 2. xaringanBuilder:::build_pdf_simple(step_html, output_file)
      at xaringanBuilder/R/pdf.R:92:8
 3. base::tryCatch(...)
      at xaringanBuilder/R/pdf.R:98:4
 4. base tryCatchList(expr, classes, parentenv, handlers)
 5. base tryCatchOne(expr, names, parentenv, handlers[[1L]])
 6. value[[3L]](cond)
Run `rlang::last_trace()` to see the full context.
✔ [77-support-building-slides-to-pdf*]

❯ sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8      
 [8] LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
[1] jrPresentation2_0.3.3

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.8.3          gert_1.6.0            ps_1.7.0              rprojroot_2.0.3       digest_0.6.29         prompt_1.0.1          utf8_1.2.2            prettycode_1.1.0      R6_2.5.1             
[10] xaringanBuilder_0.0.9 sys_3.4               evaluate_0.15         xaringan_0.24         pillar_1.7.0          rlang_1.0.2           lazyeval_0.2.2        callr_3.7.0           jquerylib_0.1.4      
[19] rmarkdown_2.14        config_0.3.1          desc_1.4.1            servr_0.24            stringr_1.4.0         httpuv_1.6.5          compiler_4.2.0        lintr_2.0.1           xfun_0.31            
[28] pkgconfig_2.0.3       askpass_1.1           htmltools_0.5.2       openssl_2.0.0         websocket_1.4.1       tibble_3.1.7          fansi_1.0.3           memuse_4.2-1          crayon_1.5.1         
[37] withr_2.5.0           later_1.3.0           jsonlite_1.8.0        lifecycle_1.0.1       magrittr_2.0.3        credentials_1.3.2     cli_3.3.0             stringi_1.7.6         cachem_1.0.6         
[46] rprofile_0.1.11       fs_1.5.2              promises_1.2.0.1      remotes_2.4.2         rex_1.2.1             xml2_1.3.3            bslib_0.3.1           ellipsis_0.3.2        vctrs_0.4.1          
[55] cyclocomp_1.1.0       tools_4.2.0           glue_1.6.2            rdoc_0.1.0            rsconnect_0.8.25      processx_3.5.3        parallel_4.2.0        fastmap_1.1.0         yaml_2.3.5           
[64] chromote_0.1.0        memoise_2.0.1         knitr_1.39            pagedown_0.18         sass_0.4.1           

build_pptx : output_file not found

Hi @jhelvy !
I`m trying to use this package for the first time.
Someone asked me if it was possible to convert a xaringan presentation into pptx.

I tried to use the function build_pptx() and I keep getting the same error.

Example 1:

xaringanBuilder::build_pptx("https://jhelvy.github.io/xaringanBuilder/reference/figures/slides.html")
#> ℹ Building slides.pdf from slides.html
#> ✓ Building slides.pdf from slides.html ... done
#> 
#> Error in fs::path_file(output_file): objeto 'output_file' não encontrado

Created on 2021-03-26 by the reprex package (v1.0.0)

The error was "output_file" not found. So I used a name for an output file and got the same error:

xaringanBuilder::build_pptx(input = "https://jhelvy.github.io/xaringanBuilder/reference/figures/slides.html",
                            output_file = "slides.pptx")
#> ℹ Building slides.pdf from slides.html
#> ✓ Building slides.pdf from slides.html ... done
#> 
#> Error in fs::path_file(output_file): objeto 'output_file' não encontrado

Created on 2021-03-26 by the reprex package (v1.0.0)

Do you have any tips of what am I doing wrong? Thank you so much!

Edit: a PDF version was created. But not the pptx.

Edit 2: I do not have the Powerpoint from Microsoft, only LibreOffice. Maybe this is causing the error?

Can't find Google Chrome when it is installed in Linux

Hello,

I'm running the latest versions of R and Rstudio on Arch-derived Garuda Linux. I'm also running the latest version of Google Chrome.

I want to output PDF from my Xaringen slides (I can see the HTML just fine).

But I get the following error:

google-chrome` and `chromium-browser` were not found. Try setting the CHROMOTE_CHROME environment variable or adding one of these executables to your PATH.
Error: This function requires a local installation of the Chrome browser. You can also use other browsers based on Chromium, such as Chromium itself, Edge, Vivaldi, Brave, or Opera.

I see how to set the environmental variable, but I'm getting an error from the Fish shell:

╰─λ Sys.setenv(CHROMOTE_CHROME = "/usr/bin/google-chrome-stable")
fish: Command substitutions not allowed
Sys.setenv(CHROMOTE_CHROME = "/usr/bin/google-chrome-stable")

xaringanBuilder requires cli 3.0.0

I'm trying to build from an "index.Rmd" file.

It is:

Error: 'format_inline' is not an exported object from 'namespace:cli'

I installed chromate successfully.

Any ideas ?

Thanks!

Release renderthis 0.2.0

First release:

Prepare for release:

  • git pull
  • Check if any deprecation processes should be advanced, as described in Gradual deprecation
  • devtools::build_readme()
  • urlchecker::url_check()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • rhub::check_for_cran()
  • git push
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • git push
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • git push
  • Finish blog post
  • Tweet
  • Add link to blog post in pkgdown news menu

build_pptx()

Picking-up from twitter conversation and having jhelvy/xaringanBuilder be place to collect functionality on outputting xaringan output formats (per conversation with @EvaMaeRey ).

A functionality that is in EvaMaeRey/xaringanPrinter and not here is in outputting to pptx format. I pasted the function below (in it's other location it had the title slides_pptx()).

A few notes:

  • Function is in draft form (there are currently no checks on file paths etc.)
  • May want to handle printing differently (i.e. reliance on pagedown::chrome_print()), particularly depending on outcome from #1
  • Adding function would probably mean needing to add {officer} to suggests in the DESCRIPTION
  • EvaMaeRey/flipbookr#33 is where initial notes are regarding considerations on this function

Feel free to make any changes. Let me know your thoughts and if you'd like me to open a PR?

#' Print Flipbook to Powerpoint
#'
#' @param input Name of the Rmd or html slides file.
#' @return A .pdf, .html, series of .png images, and a .pptx
#' @export
build_pptx <- function(input){

  filepath_no_ext <- fs::path_ext_remove(input)
  filepath_pdf <- fs::path_ext_set(filepath_no_ext, "pdf")
  filepath_pptx <- fs::path_ext_set(filepath_no_ext, "pptx")

  pagedown::chrome_print(input) # run if have not already created pdf

  screen_imgs <- pdftools::pdf_convert(pdf = filepath_pdf, format = "png", verbose = FALSE)

  doc <- officer::read_pptx()
  for (i in 1:length(screen_imgs)) {
    doc <- doc %>%
      officer::add_slide(layout = "Blank", master = "Office Theme") %>%
      officer::ph_with(
        value = officer::external_img(screen_imgs[[i]]),
        location = officer::ph_location_fullsize()
      )
  }

  print(doc, filepath_pptx)
}

Fixed a typo after initial post -- had input where meant to have screen_imgs when initiating for loop.

Add mp4 output

Following up on this issue - try figuring out how to print to a video output for uploading slideshow to social media when gif doesn't work well.

Missing plots due to messed up margins in PDF but not HTML

I am still having problems with plots extending past the margins and then not being included in PDF output.

@gadenbuie suggested including a red outline to see the problem. Well, this red outline shows fine on the HTML, but totally past the margins in the PDF (produced using to_pdf in renderthis).

HTML:

image

PDF:

image

Any idea about what I shoudl do?

`renderthis::to_pdf()` is unable to capture footnotes from Quarto presentation

Hi,

I am using renderthis_0.2.0 and Quarto version 1.2.269

I have created a Quarto script called index.qmd that has the one title slide followed by one content slide. I tried to add an aside and footer on the content slide

---
title: "Title"
author: "Name"
format: 
  revealjs:
    navigation-mode: linear
---

## Quarto

Quarto enables you to weave together content and executable code into a finished presentation. To learn more about Quarto presentations see <https://quarto.org/docs/presentations/>.

::: aside
Some additional commentary of more peripheral interest.
:::

::: footer
My footer
:::

I have rendered the file to index.html and tried to convert it to pdf using the command

renderthis::to_pdf("index.html")

When I take a look at the pdf file, the content slide seems to have lost the footer but the aside can be seen.

For reference, this is how it looks like in html

image

and in pdf

image

Hope this is reproducible from your end.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.