class Bookify::Node::H1
Public Instance Methods
render()
click to toggle source
# File lib/bookify/node/h1.rb, line 5 def render break_if_close_to_bottom(250) move_down 30 unless pdf.y == page_top html = decode_html(node.inner_html.strip) dest = dest_xyz(0, pdf.y, nil, pdf.page) Bookify::Sections.add(:h1, html, dest) add_dest(html, dest) font :h1 do text html, align: :center end move_down 30 end