3 Replies Latest reply on Dec 7, 2010 12:11 PM by Flex harUI

    TextArea printing problem?

    Vibhor Seth

      Hello,

       

      I am facing a problem while printing the content of TextArea. My textarea contains large data to be printed with same formatting.

      my code

      var printJob:FlexPrintJob = new FlexPrintJob();
      if (printJob.start()) 
      {
       //add the group
       var group:HGroup = new HGroup();   
       //set the height
       group.height = printJob.pageHeight;
       //set the width
       group.width = printJob.pageWidth;   
       //declare the text
       var textA:Text = new Text();
       //set the width to adjust with printer
       textA.percentWidth = 100;
       //set the text as html
       textA.text = textArea.text;  
       //add to the group  
       group.addElement(textA);  
       //add group to the screen
       addElement(group);
       //send job to printer
       printJob.addObject(group);
       printJob.send();
       removeElement(group);
      }

       

      Problems:

       

      1. Only one page is printed.

      2. No formatting.

       

      Help required...

       

      Thanks in advance.