0 Replies Latest reply on Nov 14, 2008 2:59 PM by bmabray

    Printing an HTML component

    bmabray
      I've created a custom component that includes an HTML component. I'm trying to print it using FlexPrintJob. Basically, like this:

      this._printJob = new FlexPrintJob;
      if (this._printJob.start())
      {
      printStoryView.width = _printJob.pageWidth;
      printStoryView.height = _printJob.pageHeight;
      printStoryView.storyView.width = _printJob.pageWidth;
      this._printJob.addObject(this.printStoryView);
      this._printJob.send();
      }

      However, the HTML component hasn't finished re-rendering the HTML content to the new width before the job gets sent to the printer. I've tried adding various event listeners to call addObject and send after the HTML component completes, but all the events I've tried (HTML_RENDER, COMPLETE, UPDATE_COMPLETE, and more) either fire too soon or don't fire until after the print job times out.

      Any suggestions?