0 Replies Latest reply on Oct 13, 2009 9:48 AM by nnmmooppqq

    Can't print full page

    nnmmooppqq Level 1

      I'm trying to print an object full page, landscape. I can get the object to print, but not full page. Below is the code. certRenderer is a custom component designed for printing. It has an image fields, some text fields and a borader. Please help! Thanks.

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      public

       

       

      function printContent():void {//called by contentManager based on click event from main printBtn

       

       

      //setup print job:

       

       

      var printJob:FlexPrintJob = new FlexPrintJob();

      if (printJob.start()) {

       

       

      //Create instance of printRenderer:

       

       

      var certRenderer:certPrintRenderer = new certPrintRenderer();

      certRenderer.rotation = 90;

      certRenderer.width=printJob.pageHeight ;

      certRenderer.height=printJob.pageWidth;

       

       

      this.addChild(certRenderer);

      certRenderer.tbname.htmlText=parentApplication.fullName;

      certRenderer.tbcert.htmlText=parentApplication.certTop;

      certRenderer.tbcomplete.htmlText=parentApplication.certHasCompleted;

      certRenderer.tbtitle1.htmlText=newtitle1;

      certRenderer.tbtitle2.htmlText=newtitle2;

       

       

      var scoretext:String = parentApplication.certWithScore+" "+doScore().toString()+" "

      +parentApplication.certOutOf;

      certRenderer.tbscore.htmlText=scoretext;

      date =

      new Date().toString();

      date = df.format(date);

      certRenderer.tbdate.htmlText=date;

      certRenderer.timgSrcLeft.source=imgSrcLeft.source;

       

       

       

       

      //make printRenderer invisible

      certRenderer.visible=

      false;

      printJob.addObject(certRenderer, FlexPrintJobScaleType.SHOW_ALL);

      printJob.send();

       

       

      this.removeChild(certRenderer);

      }