struct MarkpdfWeb::RenderParams

Defined in:

web.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_form(form : HTTP::Params) : RenderParams #

Parse the knobs from a submitted form. Every field is optional and falls back to the markpdf CLI default, so a bare form with just a markdown body renders fine. Raises ParamError with a user-presentable message when a value is out of range.


[View source]
def self.new(markdown : String, style : String, theme : Nil | String, code_theme : Nil | String, page_size : String, margins : String, header : String, footer : String, pageless : Bool, hyphenate : Bool, language : String, custom_css : Nil | String) #

[View source]

Instance Method Detail

def code_theme : String | Nil #

[View source]
def custom_css : String | Nil #

[View source]
def footer : String #

[View source]
def header : String #

[View source]
def hyphenate? : Bool #

[View source]
def language : String #

[View source]
def margins : String #

[View source]
def markdown : String #

[View source]
def page_size : String #

[View source]
def pageless? : Bool #

[View source]
def style : String #

[View source]
def theme : String | Nil #

[View source]