kableExtra icon indicating copy to clipboard operation
kableExtra copied to clipboard

Is it possible to use webhot2 instead of webshot in the save_kable function?

Open henricombrink opened this issue 3 years ago • 3 comments

I can not get webshot to work on my system due to deprecated library dependencies. As a result, save_kable() fails. The new webshot2 (https://github.com/rstudio/webshot2) does work. Could webhot2 be used instead of webshot in the save_kable() function?

─ Session info setting value
version R version 4.0.3 (2020-10-10) os Debian GNU/Linux bullseye/sid system x86_64, linux-gnu
ui RStudio
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz America/Los_Angeles
date 2021-05-21

henricombrink avatar May 21 '21 18:05 henricombrink

I tried this on a forked version locally by calling webshot2 instead of webshot. It seems to work without issues for .png. For .pdf it gives some error messages, but it does create the pdf.

henricombrink avatar May 21 '21 19:05 henricombrink

webshot2 is not on CRAN and it doesn't look like it will go to CRAN in anytime soon. Also, I remember the mechanism is quite different. If you have a script that is working and you are willing to share it on a gist of blog, I'm happy to put them in the doc or function doc in save_kable().

haozhu233 avatar May 25 '21 21:05 haozhu233

I just realize I raised a similar issue https://github.com/haozhu233/kableExtra/issues/657, but detailing my bug a bit more.

@henricombrink I'd love to see your forked version! I'm trying to engineer something similar

daaronr avatar Oct 01 '21 22:10 daaronr

FWIW, webshot2 is now available on CRAN: https://cran.r-project.org/web/packages/webshot2/index.html

vincentarelbundock avatar Oct 20 '22 01:10 vincentarelbundock

Fixed here: https://github.com/haozhu233/kableExtra/pull/768

vincentarelbundock avatar Dec 04 '23 22:12 vincentarelbundock