RLesur / crrri

A Chrome Remote Interface written in R

Home Page:https://rlesur.github.io/crrri/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using crrri to save PDF output from gt package?

Dr-Joe-Roberts opened this issue · comments

Is it possible to use the crrri package to generate a PDF of the tables generated using the gt package?

Yes, you can generate a pdf of any web page with chrome.
If this is your need, I recommend you to give a try first to pagedown::chrome_print().
If this function does not suit your needs then write your own async function.

I am not sure, but pagedown::chrome_print() doesn't appear to work with the gt object.

of course, you have to save the gt object as a standalone html file, then print this html file

Apologies, I didn't explain that very well. I can get the gt object to print using pagdown::chrome_print(), but it is not formatted correctly. This is slightly off topic for here though, so may cross post this to the gt package.

One way to check what printing with crrri would look like is to interactively open your document in chrome then click the print to PDF button and see how it looks in the pre-visualisation window. Sometimes, this rendering does not appear the same as in the navigator.
If this is not shown as you want in the browser, crrri won't help print it better until something is change in the webpage.
Please, cross post in gt and link to here so that we can follow and see what can be done. Thanks for the report !

@Dr-Joe-Roberts is this still an issue ?
If so, do you have a reproductible example we can use ?