4 Replies Latest reply on Jun 13, 2011 8:28 AM by Flex harUI

    Need help in Printing in Flex 4

    hEcToR_indi

      Hii all!

      i am a newbie here on flex 4.

      i want to print a dynamically loaded content in htmlobject but when printing only the visible part shows up.

      i have tried all the combination of scaletype but nothing good happend

      here is the code

       

      var htmlObj:HTML = null;

       

       

      public function onPrintEvent(event:MouseEvent) : void

      {

      if (htmlContentUrl != null) {

       

      var pr:FlexPrintJob = new FlexPrintJob();

       

       

      var htmlObj1:HTML = new HTML();

      htmlObj1.location = htmlContentUrl;

       

      if(pr.start())

      {

      pr.printAsBitmap =

      false;

      pr.addObject(htmlObj,FlexPrintJobScaleType.SHOW_ALL);

      pr.send();

      }

       

      else

      {

      Alert.show(

       

      "error in printing");

      }

      }

      }

       

      please hepl me ut on this!!

      thnks in advance!!