Save a flextable as a png image.
Arguments
- x
a flextable object
- path
image file to be created. It should end with '.png'.
- expand
space in pixels to add around the table.
- res
The resolution of the device
- ...
unused arguments
See also
Other flextable print function:
as_raster()
,
df_printer()
,
flextable_to_rmd()
,
gen_grob()
,
htmltools_value()
,
knit_print.flextable()
,
plot.flextable()
,
print.flextable()
,
save_as_docx()
,
save_as_html()
,
save_as_pptx()
,
save_as_rtf()
,
to_html.flextable()
Examples
library(gdtools)
register_liberationsans()
#> [1] TRUE
set_flextable_defaults(font.family = "Liberation Sans")
ft <- flextable(head(mtcars))
ft <- autofit(ft)
tf <- tempfile(fileext = ".png")
save_as_image(x = ft, path = tf)
#> [1] "/tmp/Rtmpnb3Z92/file2e205a326fe3.png"
init_flextable_defaults()