Class: HtmlConverter::Renderer::PDF
- Defined in:
- lib/htmlconverter/renderer/pdf.rb
Instance Method Summary collapse
Methods inherited from Base
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 |
# File 'lib/htmlconverter/renderer/pdf.rb', line 5 def render(page) printer = Qt::Printer.new(Qt::Printer::HighResolution) generate do |filename| printer.setOutputFileName(filename) printer.setOutputFormat(Qt::Printer::PdfFormat) page.mainFrame.print(printer) end end |