is there a way to detect page change?

3 views
Skip to first unread message

patrick aljord

unread,
Jun 9, 2007, 6:38:16 PM6/9/07
to Ruby on Rails: RFPDF
Hey all,
I'm using rfpdf to print invoices, when a page is changed, I would
like to reprint the column header on the new page. Is there a way to
do this?

thanx in advance

Pat

PS: that's the code I'm using (I'm using the table module but if you
have a way to do it without I'm interested)

pdf = FPDF.new
pdf.AddPage
pdf.SetFont('helvetica','',10)

data = []
30.times { |i| data << ['mlkmlk','5','2','10' * 10] }

columns = [
{:title => 'Reference'},
{:title => 'Unit Price (Euro)'},
{:title => 'Quantity'},
{:title => 'Total Price (Euro)'}
]
pdf.table(data, columns)
pdf.Output

Reply all
Reply to author
Forward
0 new messages