class Markd::Pdf::Renderer

Defined in:

pdf_renderer.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(options : Options = Options.new, style : String = "default", theme : String | Nil = nil, code_theme : String | Nil = nil, page_size : String = "a4", margin_mm : Float64 = 20.0, base_dir : String = ".", header : String = "", footer : String = "", html_input : Bool = false, pageless : Bool = false, hyphenate : Bool = false, language : String = "en", css_layers : Array(String) = [] of String) #

[View source]

Instance Method Detail

def add_css(css : String) : Nil #

Layer extra CSS on top of the style (later layers win on equal specificity, like repeated --css flags in the CLI).


[View source]
def base_dir : String #

[View source]
def code_theme : String? #

[View source]
def css : String #

The complete stylesheet this renderer uses: the built-in style, then the theme (when set), then user layers — each later block winning on equal specificity.


[View source]
def css_layers : Array(String) #

[View source]
def footer : String #

[View source]
def header : String #

[View source]
def html_input : Bool #

[View source]
def hyphenate : Bool #

[View source]
def language : String #

[View source]
def margin_mm : Float64 #

[View source]
def options : Markd::Options #

[View source]
def page_size : String #

[View source]
def pageless : Bool #

[View source]
def render(source : String, output_path : String) : Int32 #

Render markdown — or a complete HTML document — to output_path. Returns the page count; raises Markd::Pdf::Error on failure.


[View source]
def style : String #

[View source]
def theme : String? #

[View source]