class Wkhtmltopdf::WkPdf
- Wkhtmltopdf::WkPdf
- Reference
- Object
Defined in:
wkhtmltopdf/wk_pdf.crConstructors
-
.new(path = "")
Init default values
Instance Method Summary
-
#buffer : Slice(UInt8)?
Buffer used for in-memory generation (available if no output is specified)
-
#convert(html = nil)
Convert to PDF
-
#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
def self.new(path = "")
#
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)
def convert(html = nil)
#
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)