//Add more objects to printData so that it can span up to 2-3 pages.

var printData:ArrayCollection = new ArrayCollection([
{name:'Raj', phone:'12345'},
{name:'Abc', phone:'12345'},
{name:'xyz', phone:'12345'},
{name:'lmn', phone:'12345'},
{name:'pqr', phone:'12345'},
{name:'sat', phone:'12345'}]);

var col1:GridColumn = new GridColumn("Name', 'name', 100,
Align.CENTER, Align.CENTER);
var col2:GridColumn = new GridColumn("Phone', 'phone', 100,
Align.CENTER, Align.CENTER);

var gridColumns:Array = new Array (col1, col2);
var pdfGrid:Grid = new Grid(printData.toArray(), 250, 300, new
RGBColor(0xCCCCCC), new RGBColor(0xEEEEEE), true, new RGBColor
(0x000000), 1, Joint.BEVEL, gridColumns);

var pdf:PDF = new PDF(Orientation.PORTRAIT, Unit.MM, Size.LETTER);
pdf.setDisplayMode(Display.REAL, Layout.SINGLE_PAGE);
pdf.addPage();
pdf.setStartingPage(1);
pdf.textStyle(new RGBColor(0), 1);
pdf.setFont(new CoreFont(FontFamily.ARIAL), 8);
pdf.addGrid(pdfGrid, 10, 10, true);


for (var page:int=1; page<=pdf.totalPages; page++) {
        pdf.gotoPage(page);
        pdf.addText(""+page, 198, 260); //(x,y) Location where page number
will be dispalyed
}



On Aug 3, 8:21 am, sowmya <sowmyaf...@gmail.com> wrote:
> Am able to generate the pdf with multiple pages..
> How to add to page number to the pdf??
>
> Thanks in advance
> Sowmya

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_india@googlegroups.com.
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to