2 Replies Latest reply on Mar 25, 2010 8:30 PM by fresher4flex

    Conversion of Datagrid to Pdf

    bsagarvidya123

      Hi all,

              please let me know how to convert datagrid to pdf .

       

      vidya sagar reddy

        • 1. Re: Conversion of Datagrid to Pdf
          Aman_SS

          hi

             i have done the same. Use alivepdf APIs to do conversion. download alivepdf.swc and set  the library path to this SWC. U will get the demo app too there on net. Its easily acheivable.

          :-)

          • 2. Re: Conversion of Datagrid to Pdf
            fresher4flex

            You can do it in 2 ways

             

            pdf:PDF=new PDF()

             

            1) USing pdf.addImage(datagrid_id);

             

            2)

             

             

            var gridcolumnItem:GridColumn=new GridColumn("Item","item",15);

             

            var gridcolumnLabel:GridColumn=new GridColumn("label Column","label",15);

             

            var gridArray:Array=new Array(gridcolumnItem,gridcolumnLabel);

             

             

            var gridArray:Array=new Array(gridcolumnItem,gridcolumnLabel);

             

            var dGrid:Grid=new Grid(printableItems,15,10,new RGBColor(0xabedea),new RGBColor(0xadedca),

             

            true,new RGBColor(0xfbbded),1,Joint.MITER,gridArray);

            pdf.addGrid(dGrid,30,50);

             

            <mx:DataGrid

             

            x="389" y="233" id="dg1" dataProvider="{itemsCollection}" height="285" width="290">

             

            <mx:columns>

             

            <mx:DataGridColumn headerText="Column 1" dataField="item"/>

             

            <mx:DataGridColumn headerText="Column 2" dataField="label"/>

             

            </mx:columns>

             

            </mx:DataGrid>

             

            here is the Link I got it from

            http://forums.esri.com/Thread.asp?c=158&f=2421&t=302275