powered by
save a flextable as a png, pdf or jpeg image.
Image generated with package 'webshot' or package 'webshot2'. Package 'webshot2' should be prefered as 'webshot' can have issues with some properties (i.e. bold are not rendered for some users).
save_as_image(x, path, zoom = 3, expand = 10, webshot = "webshot")
a flextable object
image file to be created. It should end with .png, .pdf, or .jpeg.
parameters used by webshot function.
webshot
webshot package as a scalar character, one of "webshot" or "webshot2".
Other flextable print function: as_raster(), docx_value(), htmltools_value(), knit_print.flextable(), plot.flextable(), print.flextable(), save_as_docx(), save_as_html(), save_as_pptx()
as_raster()
docx_value()
htmltools_value()
knit_print.flextable()
plot.flextable()
print.flextable()
save_as_docx()
save_as_html()
save_as_pptx()
# NOT RUN { ft <- flextable( head( mtcars ) ) ft <- autofit(ft) tf <- tempfile(fileext = ".png") # } # NOT RUN { if( require("webshot") ){ save_as_image(x = ft, path = "myimage.png") } # }
Run the code above in your browser using DataLab