# File lib/rabbit/element/poppler-page.rb, line 10 def initialize(page) @page = page super() end
# File lib/rabbit/element/poppler-page.rb, line 31 def clear_theme super @width, @height = @page.size end
# File lib/rabbit/element/poppler-page.rb, line 15 def draw_element(canvas, x, y, w, h, simulation) unless simulation canvas.draw_poppler_page(@page, x, y, :width => w, :height => h) end [x, y + height, w, h - height] end
# File lib/rabbit/element/poppler-page.rb, line 26 def text rectangle = Poppler::Rectangle.new(0, 0, @width, @height) @page.get_text(rectangle) end
# File lib/rabbit/element/poppler-page.rb, line 22 def title text.split(/\r?\n/, 2).first end