gdtiti / alivepdf

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

Unable to addGrid to PDF #206

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create simple applcation as shown below
2. attempt to use addGrid constructor
3.

What is the expected output? What do you see instead?
application generate a PDF with alivePDF grid control
application doesn't fire

What version of the product are you using? On what operating system?
0.1.4.9 / Windows 7

Please provide any additional information below.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

<mx:Script>
        <![CDATA[
            import org.alivepdf.colors.RGBColor;
            import org.alivepdf.data.GridColumn;
            import org.alivepdf.pdf.PDF;
            import org.alivepdf.layout.Size;
            import org.alivepdf.layout.Unit;
            import org.alivepdf.layout.Orientation;
            import org.alivepdf.display.Display;
            import org.alivepdf.saving.Method;
            import org.alivepdf.images.ImageFormat;
            import org.alivepdf.images.ResizeMode;
            import org.alivepdf.saving.Download;
            import org.alivepdf.fonts.FontFamily;
            import org.alivepdf.fonts.FontType;
            import org.alivepdf.fonts.Style;
            import org.alivepdf.data.Grid;
            import org.alivepdf.drawing.Joint;
            import mx.collections.ArrayCollection;

            public function doPDF():void
            {

            var myPDF:PDF = new PDF;
            myPDF = new PDF(Orientation.PORTRAIT, Unit.MM,  Size.LETTER);

            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 (0x00CCFF), new RGBColor (0xFFFFFF), new RGBColor ( 
0x000c44 ),true, new RGBColor ( 0xccc000 ),1,Joint.MITER);
            //var mygrid:Grid = new Grid(dp.toArray(),6,4,new RGBColor 
(0xFFFFFF), new RGBColor (0xCCCCCC), new RGBColor (0xFFF000),true, new 
RGBColor (0xCCCCCC),1,Joint.MITER);

            myPDF.addGrid(grid,2,2);

            myPDF.addPage();

            myPDF.save
(Method.REMOTE, "http://project.unthinkmedia.com/un/createPDF/create.php",D
ownload.INLINE,"myPDF.pdf");
            }
        ]]>
</mx:Script>

    <mx:Button label="Cancel" click="doPDF()" />

</mx:Application>

Original issue reported on code.google.com by Gibb...@gmail.com on 10 Mar 2010 at 3:20