lib/rabbit/element/poppler-slide.rb in rabbit-2.1.3 vs lib/rabbit/element/poppler-slide.rb in rabbit-2.1.4

- old
+ new

@@ -3,10 +3,11 @@ module Rabbit module Element class PopplerSlide < Slide def initialize(page) + @raw_page = page @page = PopplerPage.new(page) super(@page) end def headline @@ -17,9 +18,14 @@ @page end def title (@page.text.split(/\r?\n/, 2)[0] || super).chomp + end + + def size_ratio + w, h = @raw_page.size + w.to_f / h.to_f end end end end