struct
MarkpdfWeb::RenderParams
- MarkpdfWeb::RenderParams
- Struct
- Value
- Object
Defined in:
web.crConstructors
-
.from_form(form : HTTP::Params) : RenderParams
Parse the knobs from a submitted form.
- .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)
Instance Method Summary
- #code_theme : String | Nil
- #custom_css : String | Nil
- #footer : String
- #header : String
- #hyphenate? : Bool
- #language : String
- #margins : String
- #markdown : String
- #page_size : String
- #pageless? : Bool
- #style : String
- #theme : String | Nil
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.