Class: Payday::PdfRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/payday/pdf_renderer.rb

Overview

The PDF renderer. We use this internally in Payday to render pdfs, but really you should just need to call {Payday{Payday::Invoiceable{Payday::Invoiceable#render_pdf} to render pdfs yourself.

Class Method Summary (collapse)

Class Method Details

+ (Object) render(invoice)

Renders the given invoice as a pdf, returning a string



13
14
15
# File 'lib/payday/pdf_renderer.rb', line 13

def self.render(invoice)
  pdf(invoice).render
end

+ (Object) render_to_file(invoice, path)

Renders the given invoice as a pdf on disk



8
9
10
# File 'lib/payday/pdf_renderer.rb', line 8

def self.render_to_file(invoice, path)
  pdf(invoice).render_file(path)
end