% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/printers.R
\name{as_raster}
\alias{as_raster}
\title{get a flextable as a raster}
\usage{
as_raster(x, zoom = 2, expand = 2, webshot = "webshot", ...)
}
\arguments{
\item{x}{a flextable object}

\item{zoom, expand}{parameters used by \code{webshot} function.}

\item{webshot}{webshot package as a scalar character, one of "webshot" or
"webshot2".}

\item{...}{additional arguments passed to other functions}
}
\description{
save a flextable as an image and return the corresponding
raster. This function has been implemented to let flextable be printed
on a ggplot object.
}
\note{
This function requires packages: webshot and magick.
}
\examples{
ft <- qflextable(head(mtcars))
\dontrun{
if (require("ggplot2") && require("webshot")) {
  print(qplot(speed, dist, data = cars, geom = "point"))
  grid::grid.raster(as_raster(ft))
}
}
}
\seealso{
Other flextable print function: 
\code{\link{df_printer}()},
\code{\link{flextable_to_rmd}()},
\code{\link{gen_grob}()},
\code{\link{htmltools_value}()},
\code{\link{knit_print.flextable}()},
\code{\link{plot.flextable}()},
\code{\link{print.flextable}()},
\code{\link{save_as_docx}()},
\code{\link{save_as_html}()},
\code{\link{save_as_image}()},
\code{\link{save_as_pptx}()}
}
\concept{flextable print function}
