Class: Ruport::Controller::Invoice::PDF
Instance Method Summary
collapse
#add_title, #build_company_header, #build_customer_header, #build_order_header, #build_title, #horizontal_line
#draw_graph
Instance Method Details
#build_invoice_body ⇒ Object
85
86
87
88
|
# File 'lib/ruport/util/invoice.rb', line 85
def build_invoice_body
move_cursor_to 600
draw_table data, :width => options.body_width || 450
end
|
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
# File 'lib/ruport/util/invoice.rb', line 90
def
pdf_writer.open_object do ||
pdf_writer.save_state
pdf_writer.stroke_color! Color::RGB::Black
pdf_writer.stroke_style! ::PDF::Writer::StrokeStyle::DEFAULT
if options.
move_cursor_to 60
horizontal_line left_boundary + 20, right_boundary - 25
move_cursor(-10)
add_text(options.,:justification => :center,
:left => 0, :right => 0 )
end
pdf_writer.restore_state
pdf_writer.close_object
pdf_writer.add_object(, :all_pages)
end
end
|
78
79
80
81
82
83
|
# File 'lib/ruport/util/invoice.rb', line 78
def
build_title
end
|
#finalize_invoice ⇒ Object
115
116
117
|
# File 'lib/ruport/util/invoice.rb', line 115
def finalize_invoice
output << pdf_writer.render
end
|