Top Level Namespace

Defined in:

Constant Summary

RENDER_LIMITER = MarkpdfWeb::RateLimiter.new(MarkpdfWeb::MAX_RENDERS_PER_MIN, 1.minute)

Method Summary

Method Detail

def abort_with(message : String) #

[View source]
def build_renderer(options, style, theme, code_theme, page_size, margins, kdp, mirror_headers, base_dir, header, footer, html_input, pageless, hyphenate, language) #

[View source]
def list_styles(selected : String) #

List the built-in stylesheets, marking the selected one.


[View source]
def main(source, output, page_size, margin, css_paths, font_paths, emoji_font, header, footer, theme, code_theme, style, html_input, pageless, hyphenate, language, no_remote_images, kdp, mirror_headers, toc, toc_depth_string, toc_title) #

[View source]
def main(source, theme, code_theme, force_links = false, force_color = false, width = nil, hyphenate = false, language = "en", images = nil, no_links = false, no_pager = false) #

[View source]
def main(source) #

[View source]
def register_fonts(font_paths : Array(String)) #

[View source]
def render_kdp(input, output, margin, options, style, theme, code_theme, page_size, mirror_headers, base_dir, header, footer, html_input, pageless, hyphenate, language, toc, toc_depth, toc_min_level, toc_title) #

The kdp gutter sizing, the TOC page numbers and the kdp warnings all come from the library's settle loop; the CLI only picks where the PDF lands and which code theme applies.


[View source]
def render_toc(input, output, renderer, toc_depth, toc_min_level, toc_title, pageless) #

Non-kdp TOC renders go through the same settle loop, against the renderer the CLI already built (margins are fixed without the gutter table, so one instance serves every pass).


[View source]
def setup_emoji_font(emoji_font : String) #

[View source]
def toc_levels_from(spec : String) : TocLevels #

--toc-depth: a level N lists 1..N, a range N-M only levels N through M, inclusive (so 2-2 is level 2 alone); both bounded by 1..6, or the run stops here.


[View source]