Class: HtmlConverter::Renderer::PS

Inherits:
Base
  • Object
show all
Defined in:
lib/htmlconverter/renderer/ps.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from HtmlConverter::Renderer::Base

Instance Method Details

#render(page) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/htmlconverter/renderer/ps.rb', line 5

def render(page)
  printer = Qt::Printer.new(Qt::Printer::HighResolution)
  generate do |filename|
    printer.setOutputFileName(filename)
    printer.setOutputFormat(Qt::Printer::PostScriptFormat)

    page.mainFrame.print(printer)
  end
end