Class: PDF::Reader

Inherits:
Object
  • Object
show all
Defined in:
lib/pdf/reader/html.rb,
lib/pdf/reader/html/version.rb

Defined Under Namespace

Classes: Html, Page

Instance Method Summary collapse

Instance Method Details

#to_html(options = {}) ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'lib/pdf/reader/html.rb', line 16

def to_html(options={})
  HtmlWriter.new.write do |html|
    html.doctype options[:doctype] || 5
    html.head do |head|
      head.title options[:title] || ''
    end
    html.body self.pages.map(&:to_html).join('')
  end
end