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.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/render-jpg.R
  3. \name{render_jpeg}
  4. \alias{render_jpeg}
  5. \title{Return a image (in JPEG format) of the javascript-rendered page.}
  6. \usage{
  7. render_jpeg(splash_obj = splash_local, url, base_url = NULL,
  8. quality = 75, width, height, timeout = 30, resource_timeout,
  9. wait = 0, render_all = TRUE, proxy, js, js_src, filters,
  10. allowed_domains, allowed_content_types, forbidden_content_types,
  11. viewport = "full", images, headers, body, http_method, save_args,
  12. load_args)
  13. }
  14. \arguments{
  15. \item{splash_obj}{Object created by a call to \code{\link[=splash]{splash()}}}
  16. \item{url}{The URL to render (required)}
  17. \item{base_url}{The base url to render the page with.}
  18. \item{quality}{JPEG quality parameter in range from 0 to 100. Default is quality=75.}
  19. \item{width}{Resize the rendered image to the given width/height (in
  20. pixels) keeping the aspect ratio. These are optional}
  21. \item{height}{Resize the rendered image to the given width/height (in
  22. pixels) keeping the aspect ratio. These are optional}
  23. \item{timeout}{A timeout (in seconds) for the render (defaults to 30). Without
  24. reconfiguring the startup parameters of the Splash server (not this package)
  25. the maximum allowed value for the timeout is 60 seconds.}
  26. \item{resource_timeout}{A timeout (in seconds) for individual network requests.}
  27. \item{wait}{Time (in seconds) to wait for updates after page is loaded (defaults to 0).}
  28. \item{render_all}{If \code{TRUE} extend the viewport to include the whole webpage
  29. (possibly very tall) before rendering.}
  30. \item{proxy}{Proxy profile name or proxy URL.}
  31. \item{js}{Javascript profile name.}
  32. \item{js_src}{JavaScript code to be executed in page context.}
  33. \item{filters}{Comma-separated list of request filter names.}
  34. \item{allowed_domains}{Comma-separated list of allowed domain names. If present, Splash
  35. won’t load anything neither from domains not in this list nor from subdomains of
  36. domains not in this list.}
  37. \item{allowed_content_types}{Comma-separated list of allowed content types. If present,
  38. Splash will abort any request if the response’s content type doesn’t match any of
  39. the content types in this list. Wildcards are supported.}
  40. \item{forbidden_content_types}{Comma-separated list of forbidden content types. If
  41. present, Splash will abort any request if the response’s content type matches
  42. any of the content types in this list. Wildcards are supported.}
  43. \item{viewport}{View width and height (in pixels) of the browser viewport to render the
  44. web page. Format is “<width>x<height>”, e.g. 800x600. Default value is "full".}
  45. \item{images}{Whether to download images.}
  46. \item{headers}{HTTP headers to set for the first outgoing request.}
  47. \item{body}{Body of HTTP POST request to be sent if method is POST.}
  48. \item{http_method}{HTTP method of outgoing Splash request.}
  49. \item{save_args}{A list of argument names to put in cache.}
  50. \item{load_args}{Parameter values to load from cache}
  51. }
  52. \value{
  53. a \link{magick} image object
  54. }
  55. \description{
  56. Return a image (in JPEG format) of the javascript-rendered page.
  57. }
  58. \references{
  59. \href{http://splash.readthedocs.io/en/stable/index.html}{Splash docs}
  60. }
  61. \seealso{
  62. Other splash_renderers: \code{\link{execute_lua}},
  63. \code{\link{render_har}}, \code{\link{render_html}},
  64. \code{\link{render_json}}, \code{\link{render_png}}
  65. }
  66. \concept{splash_renderers}