chengse66 / alivepdf

Automatically exported from code.google.com/p/alivepdf
0 stars 0 forks source link

Ever since revision 273, addGrid() creates two grid headers #323

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In older versions of AlivePDF, addGrid() worked properly. In newer revisions, 
however, adding a grid creates duplicate headers.

Here is a simple example:

var pdf:PDF = new PDF ();

pdf.addPage ();
pdf.setFont (new CoreFont (FontFamily.HELVETICA_BOLD), 16);
pdf.textStyle (new RGBColor (0x000000));

var gridData:Array = new Array ();
gridData.push ( { items: 1, description: "Hello", price: "$2", sku: "ABC" } );
var grid:Grid = new Grid (gridData, 200, 120, new RGBColor (0xDDDDDD));

pdf.addGrid (grid);

This creates two headers. No combination of grid columns, different data, 
initializing the grid differently or adding it differently could shake the 
problem. I've reverted back to revision 273, which appears to fix the issue, 
but I thought you guys should now.

Thanks!

Original issue reported on code.google.com by joshuagr...@gmail.com on 4 Jul 2011 at 1:44

GoogleCodeExporter commented 8 years ago

Comment these lines (line 3958+ in addGrid() function)in file PDF.as (rev 277) :

setXY (x +currentGrid.x, y+getY() );
addRow( columnNames,'', rect);
endFill();

Original comment by vaandefa...@gmail.com on 15 Jul 2011 at 10:44

GoogleCodeExporter commented 8 years ago
Fixed in PDF.as

Original comment by cgauth...@gmail.com on 28 Feb 2015 at 12:21