Saturday 15 September 2012

colors - pdfbox table header colouring not working properly -



colors - pdfbox table header colouring not working properly -

i usind pdfbox , trying colour header of table; had done table drawing correctly using tutorial ' http://fahdshariff.blogspot.in/2010/10/creating-tables-with-pdfbox.html'

the code follows

//draw rows float nexty = y ; (int = 0; <= rows; i++) { contentstream.drawline(margin, nexty, margin+tablewidth, nexty); nexty-= rowheight; } //draw columns float nextx = margin; (int = 0; <= cols; i++) { contentstream.drawline(nextx, y, nextx, y-tableheight); nextx += (colwidths != null) ? colwidths[i] : colwidth; }

i got code colouring follows:

contentstream.setnonstrokingcolor( color.red ); contentstream.fillrect( 10, 10, 100, 100 );

i tried set not working needed. need colour table header only. how can acheive that. please help me guys!!

table colors pdfbox

No comments:

Post a Comment