kableExtra icon indicating copy to clipboard operation
kableExtra copied to clipboard

Unable to use save_kable. Error reported.

Open onecare-business-intelligence opened this issue 1 year ago • 1 comments

When I use kable_save to save a table generated by kableExtra in png format I receive the following error. Error: rsession-utf8.exe: GeometryDoesNotContainImage `C:\test.png' @ warning/attribute.c/GetImageBoundingBox/534

The error is received in RStudio and RGui on Windows 11 machine.

kable(mtcars[1:5, ], "html") %>%
  kable_styling("striped") %>%
  save_kable('test.png')

platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status
major 4
minor 4.0
year 2024
month 04
day 24
svn rev 86474
language R
version.string R version 4.4.0 (2024-04-24 ucrt) nickname Puppy Cup

Windows 11 using kableExtra 1.4.0. The error I believe is in kableExtra and not R exe. Thank you, Phil,

This works for me on MacOS. I'd guess the issue is with the webshot2 package on your machine, which save_kable() uses to produce the output. Does this produce a picture of the Shiny web page?

webshot2::webshot("https://github.com/rstudio/shiny", "test.png")

dmurdoch avatar Nov 23 '24 17:11 dmurdoch