Tools to Work with the 'Splash' JavaScript Rendering Service in R
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.2KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/render_file.R
  3. \name{render_file}
  4. \alias{render_file}
  5. \title{Return the HTML or image (png) of the javascript-rendered page in a local file}
  6. \usage{
  7. render_file(splash_obj = splash_local, file_path, output = c("html", "png"),
  8. wait = 0, viewport = "1024x768", ...)
  9. }
  10. \arguments{
  11. \item{splash_obj}{Object created by a call to \code{\link[=splash]{splash()}}}
  12. \item{file_path}{Absolute path to a filename on the local host. \strong{This only works with a locally running Splash instance started with \url{start_splash}.}}
  13. \item{output}{either \code{html} or \code{png} to get the page content or an image capture}
  14. \item{wait}{seconds to wait}
  15. \item{viewport}{View width and height (in pixels) of the browser viewport to render the web page. Format is "\code{<width>x<height>}". e.g. 800x600. Default value is 1024x768.}
  16. \item{...}{other params to \code{\link[=render_html]{render_html()}} or \code{\link[=render_png]{render_png()}}}
  17. }
  18. \value{
  19. An XML document or \code{magick} object
  20. }
  21. \description{
  22. The suggested use-case for this is rendering a widget
  23. }
  24. \details{
  25. TODO Test if container is running
  26. TODO Enable passing in of an htmlwidget and use saveWidget
  27. }