Class: Transmuter::Format::Pdf

Inherits:
Object
  • Object
show all
Defined in:
lib/transmuter/format/pdf.rb

Instance Method Summary collapse

Constructor Details

#initialize(html, options = {}) ⇒ Pdf

Returns a new instance of Pdf.



7
8
9
10
# File 'lib/transmuter/format/pdf.rb', line 7

def initialize(html, options = {})
  parse_options(options)
  @html = html
end

Instance Method Details

#processObject



12
13
14
15
16
# File 'lib/transmuter/format/pdf.rb', line 12

def process
  kit = PDFKit.new(@html, :page_size => @options[:page_size])

  kit.to_pdf
end