murarinayak / alivepdf

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

Flex Child Components are not added from the parent one #69

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add a panel component to the application file in Flex builder
2. Add a chart component to the panel component
3. Print a Panel component to the PDF nothing will print
4. Print a chart component it will print fine

What is the expected output? What do you see instead?
Chart component should be printed it is printed in the version 0.1.4.1

What version of the product are you using? On what operating system?
AlivePDF 0.1.4.4, Flex builder 3, Windows XP SP2

Please provide any additional information below.

Please see the attach source file its a flex builder project 

Original issue reported on code.google.com by anupam.s...@gmail.com on 22 Jul 2008 at 10:18

Attachments:

GoogleCodeExporter commented 8 years ago
I have created a demo app for generating pdf from a VBox with dynamic 
child....it
doesn't work either. Take a look. I am using Flex4 SDK to save the PDF locally 
in FP 10.

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

    <mx:Script>
        <![CDATA[
            import org.alivepdf.images.ResizeMode;
            import org.alivepdf.saving.Method;
            import org.alivepdf.images.ImageFormat;
            import org.alivepdf.pages.Page;
            import org.alivepdf.display.*;
            import org.alivepdf.layout.*
            import org.alivepdf.pdf.PDF;

            private var mPDF:PDF;

            private function onPDFCreate():void
            {
                mPDF = new PDF(Orientation.PORTRAIT, Unit.MM, Size.A4 );
                mPDF.setDisplayMode( Display.FULL_PAGE, Layout.SINGLE_PAGE );
                mPDF.setTitle('Module');
                for(var i:int=0; i<10; i++){
                    var newPage:Page = new Page( Orientation.PORTRAIT, Unit.MM, Size.A4 );
                    mPDF.addPage( newPage );
                    var btn:Button = new Button();
                    btn.label = 'Click '+i;
                    vbox.addChild(btn);
                    mPDF.addImage(vbox, 0, 0, 100, 100, ImageFormat.PNG, 100, 1,
ResizeMode.FIT_TO_PAGE );
                }
                var file:FileReference = new FileReference();
                file.save(mPDF.save(Method.LOCAL), "Module.pdf.pdf");
            }

        ]]>
    </mx:Script>

    <mx:VBox id="vbox" borderStyle="solid" borderColor="0xff00ff"/>
    <mx:Button id="btn" label="CreatePDF" click="onPDFCreate()"/>
</mx:Application>

Need a quick solution...please help!!

Original comment by susrut...@gmail.com on 3 Mar 2009 at 2:20