hi friend,
when i am showing some text it is going in 1 line only   thats why
whole  text is not visible in pdf.
if txt are more it should take automatically next line.
please see code below

<?xml version="1.0" encoding="utf-8"?>
 <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml";
layout="horizontal" >
    <mx:Script>
        <![CDATA[
           import org.alivepdf.pdf.PDF;
            import org.alivepdf.saving.Method;
            import org.alivepdf.fonts.*;
            import org.alivepdf.pages.Page;
             import org.alivepdf.display.Display;
             import org.alivepdf.layout.*;

    [Bindable] private var message:String;
   private var pdf:PDF;
            private var file:File;
            private function submitData():void {
            message+='The Text Value is ' + t1.text + ' The second
text value is' + t2.text +
                        'it is testing message it is testing message it is
testing message '+
                        'The Text Value is ' + t1.text + ' The second text value
is' + t2.text+
                        'it is testing message it is testing message it is
testing message ';
            }

             public function generate ():void
             {
                submitData();

             var pdf:PDF = new PDF( Orientation.PORTRAIT, Unit.MM,
Size.A4 );
                 pdf.setDisplayMode( Display.FULL_PAGE,
Layout.SINGLE_PAGE );
                var newPage:Page = new Page (Orientation.PORTRAIT,
Unit.MM, Size.A4 );
                pdf.addPage( newPage );
                //pdf.setFont(IFont,12);
                pdf.addText(message,5,15);
                pdf.addPage();
                var fs:FileStream = new FileStream();
                file =
File.desktopDirectory.resolvePath("testPage.pdf");
                fs.open( file, FileMode.WRITE);
                var bytes:ByteArray = pdf.save(Method.LOCAL);
                                 fs.writeBytes(bytes);
                fs.close();
             }
        ]]>
    </mx:Script>

    <mx:TextInput id="t1"  text="txt111" />
    <mx:TextInput id="t2"  text="txt222"/>
   <mx:Button click="generate()" label="Generate PDF"
horizontalCenter="0" verticalCenter="0"/>

    </mx:WindowedApplication>


is any solution to show text in pdf, can we give font size also to our
text ?
thanks




On Feb 12, 8:50 pm, flex <[email protected]> wrote:
> when i am adding text into pdf, then saw my text is cutted and not
> going to next line if   text values r big,
> can we assign \n to our text in pdf
>
> On Feb 12, 5:12 pm, nithya flex <[email protected]> wrote:
>
> > use alive pdf
>
> > On Fri, Feb 12, 2010 at 5:05 PM, flex <[email protected]> wrote:
> > > hi all,
> > > i am showing 1 logo image and 1 text area which contained some text.
> > > now i want to store in on desktop in form of pdf,
> > >  is there any example for that ?
> > > thanks
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Flex India Community" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<flex_india%[email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/flex_india?hl=en.

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

Reply via email to