class

Wkhtmltopdf::WkPdf

Inherits Reference / Object

Constructors

new(path = "", force_init = false)

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, do_init = true)

Convert to PDF

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

Deinitialize the library, required only if force_init option is used

Source
object_setting(key : String, value : String)

Pdf object settings

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

NOTE: for available settings see pagePdfObject

Source
set(key : String, value : String)

Pdf global settings

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

NOTE: for available settings see pagePdfGlobal

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