sivarajankumar / alivepdf

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

addGrid with Unit.POINT #146

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Create a grid width Unit.POINT property.
The rowHeight are not resize to the cell content.

example in v0.1.5 alpha and older: 
var pdf:PDF = new PDF(Orientation.PORTRAIT, Unit.MM, Size.A4);

pdf.addPage();

var font:CoreFont = new CoreFont();

pdf.textStyle(new RGBColor(0x000000), 1);
pdf.setFont(font, 12, false);

var dp:ArrayCollection = new ArrayCollection();

dp.addItem({firstName: "Bob", lastName: "Groove", city: "Paris"});
dp.addItem({firstName: "Bob", lastName: "Wise", city: "Paris"});
dp.addItem({firstName: "Bob", lastName: "Wise", city: "Paris"});
dp.addItem({firstName: "Bob", lastName: "Wise", city: "Paris"});

var grid:Grid = new Grid(dp.toArray(), 200, 100, new RGBColor(0xDDDDDD),
new RGBColor(0xF9F9F9), new RGBColor(0xFFFFFF), true, new
RGBColor(0x000000), 1, Joint.MITER);

pdf.addGrid(grid, 5, 5);

Original issue reported on code.google.com by ricky59...@hotmail.com on 31 Jul 2009 at 1:06

GoogleCodeExporter commented 8 years ago
In the function : private function getRect ( rows:Array ):Rectangle
the variable ph is set to 5, but it's not depend of the unit and the font size ?
ex : var ph:Number = fontSizePt * k + 5;

Original comment by ricky59...@hotmail.com on 13 Aug 2009 at 7:18