Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the PDF-Table CPAN distribution.

Report information
The Basics
Id: 28542
Status: resolved
Priority: 0/
Queue: PDF-Table

People
Owner: jbazik [...] cpan.org
Requestors: pgf00a [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.9.3
Fixed in: (no value)



Subject: Bug about header_props and cell background colors
Thanks for your module, it's great. I found a bug in the table.pm line 602, your code is : ####################################################################### if ( $cell_props->[$row_cnt][$j]->{'background_color'} && ! $first_row ) { $gfx_bg->fillcolor($cell_props->[$row_cnt][$j]->{'background_color'} && ! $first_row ); } elsif( $col_props->[$j]->{'background_color'} ) { $gfx_bg->fillcolor($col_props->[$j]->{'background_color'}); } else { $gfx_bg->fillcolor($background_color); } $gfx_bg->fill(); ####################################################################### But the problem is: Even if user don't defined the header_props, the color of the first row will still be background_color. I think it should be cell_props's color or col_props's color. (Because, sometimes we need to set the color of each header's background.) I did a little on your code: ####################################################################### if( $first_row && ref $header_props ){ $gfx_bg->fillcolor($col_props->[$j]->{'background_color'}); } elsif ( $cell_props->[$row_cnt][$j]->{'background_color'} ) { $gfx_bg->fillcolor($cell_props->[$row_cnt][$j]->{'background_color'} ); } elsif( $col_props->[$j]->{'background_color'} ) { $gfx_bg->fillcolor($col_props->[$j]->{'background_color'}); } else { $gfx_bg->fillcolor($background_color); } $gfx_bg->fill(); ####################################################################### What do you think? And I have some suggestions: I hope the next version of this module could contain more setting of border. (setting of border for each cell) What do you think?
I will take a look tonight because i haven`t worked on the module for 6 months and I need a little time to get back into action :)))
I will take a look tonight because i haven`t worked on the module for 6 months and I need a little time to get back into action :)))
I will take a look tonight because i haven`t worked on the module for 6 months and I need a little time to get back into action :)))
Thanks for reporting this. It's fixed in version 0.9.4, just uploaded to cpan. John