class Wkhtmltopdf::WkPdf
- Wkhtmltopdf::WkPdf
- Reference
- Object
Defined in:
wkhtmltopdf/wk_pdf.crConstructors
-
.new(path = "", force_init = false)
Init default values
Instance Method Summary
-
#buffer : Slice(UInt8)?
Buffer used for in-memory generation (available if no output is specified)
-
#convert(html = nil, do_init = true)
Convert to PDF
-
#deinitialize
Deinitialize the library, required only if force_init option is used
-
#object_setting(key : String, value : String)
Pdf object settings
-
#set(key : String, value : String)
Pdf global settings
-
#set_output(path : String)
Set output path
-
#set_url(url : String)
Set URL to fetch content from
Constructor Detail
Init default values
path
: string with an output file path (extension included)
Instance Method Detail
def buffer : Slice(UInt8)?
#
Buffer used for in-memory generation (available if no output is specified)
Convert to PDF
html
: HTML string used as content, if omitted (or nil) a URL to fetch is required (using#set_url
)
def object_setting(key : String, value : String)
#
Pdf object settings
key
: string with key namevalue
: string with setting value
NOTE for available settings see pagePdfObject
def set(key : String, value : String)
#
Pdf global settings
key
: string with key namevalue
: string with setting value
NOTE for available settings see pagePdfGlobal
def set_output(path : String)
#
Set output path
path
: string with an output file path (extension included)
def set_url(url : String)
#
Set URL to fetch content from
url
: string with a complete URL (schema included)