Is there any way to print rmarkdown table without losing colors?


#1

I am trying to print the report (html) with css style generated by rmarkdown in Chrome browser.
However, all style/color gone after I pri
nted or saved it as pdf,


#2

Have you tried some html?

<font color="red">This is some text!</font>

https://www.w3schools.com/tags/att_font_color.asp


#3

Can you print (or make PDF) from other web pages and have it show up in color?


#4

some pages do, some pages don't show up in color. What I would like to know is if there is anyway to setup in Rmarkdown so the report could be printed out with original html color. Thanks,


#5

If you already have a .html file in color and you are able to see the colors in your chrome browser, then most probably this has nothing to do with rmarkdown, R or RStudio but with your systems configuration.


#6

Hi,

I also have to manage quite complex tables in term of layout, including color. After trying different package, I am now focusing with HuxTable.

https://hughjonesd.github.io/huxtable/

It is a nice one, you got the color and proper html and text output.

It might fit your needs for table in rmarkdown.

Regards,

jm


#7

If you can see color in your web browser, but you don't see color on your printed output, your issue is between the browser and the printer. R/RStudio has no involvement with how your web browser prints.