class

Wkhtmltopdf::WkImage

Inherits Reference / Object

Constants

FORMATS = ["jpg", "png", "bmp", "svg"]

Output formats available

Constructors

new(path = "")

Init default values

  • path: string with an output file path (extension included)
Source

Instance methods

buffer

Buffer used for in-memory generation (available if no output is specified)

Source
convert(html = nil)

Convert to image

  • html: HTML string used as content, if omitted (or nil) a URL to fetch is required (using set_url)
Source
set(key : String, value : String)

Set an option

  • key: string with key name
  • value: string with setting value

NOTE: for available settings see pagePdfObject

Source
set_output(path : String)

Set output path

  • path: string with an output file path (extension included)
Source
set_url(url : String)

Set URL to fetch content from

  • url: string with a complete URL (schema included)
Source