[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

PDF::Writer and table columns

Andrew Stone

1/17/2006 11:20:00 PM

I've just started using the PDF::Writer and am having some trouble with
table columns. When the PDF renders the columns of the table are not
ordered by the column_order. With my test data I have three tables with
each table having a different column order and the last one being correct.
The order of te first two columns on every table is consistent.

Here's a sample of the code:

table.column_order = %w(t field old new changed)

table.columns["t"] = PDF::SimpleTable::Column.new("t") {|col|
heading = PDF::SimpleTable::Column::Heading.new
heading.title = "T"
col.heading = heading
}
#repeat this for each of the columns

#to load the data
data = []
rows.each{ |row|
data << {"t" => row.change_type,
"field" => row.field_name,
"old" => row.old_value,
"new" => row.new_value,
"changed" => row.changed_at}
}

I hope it's a case of "been staring at this for too long".

thanks,
andy
--
Andrew Stone
3 Answers

Austin Ziegler

1/18/2006 2:02:00 AM

0

On 17/01/06, Andrew Stone <stonelists@gmail.com> wrote:
> I've just started using the PDF::Writer and am having some trouble with
> table columns. When the PDF renders the columns of the table are not
> ordered by the column_order. With my test data I have three tables with
> each table having a different column order and the last one being correct

Austin Ziegler

1/18/2006 5:28:00 AM

0

On 17/01/06, Austin Ziegler <halostatue@gmail.com> wrote:
> On 17/01/06, Andrew Stone <stonelists@gmail.com> wrote:
> > I've just started using the PDF::Writer and am having some trouble with
> > table columns. When the PDF renders the columns of the table are not
> > ordered by the column_order. With my test data I have three tables with
> > each table having a different column order and the last one being correct.
> > The order of te first two columns on every table is consistent.

I have reopened bug item #2129, which describes the necessary patch. I
will hopefully be able to provide a patched version soon; I am trying
to track down a number of issues introduced in several adopted
patches.

-austin
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca


Andrew Stone

1/18/2006 1:48:00 PM

0

Thank you Austin.

-andy


--
Andrew Stone