0 Replies Latest reply on May 8, 2012 6:51 PM by sjbinder

    Layout containers with flash.printing.PrintJob

    sjbinder Level 1

      I would be grateful for some help with this, if anyone could point me in the right direction.


      In an Air application, I am trying to print formatted text (to a printer) using flash.printing.PrintJob. I have to use flash.printing.PrintJob's start2 method, as it's the only way to bypass the print dialog. I would love to use a VBox or VGroup control to organize the text, but alas, these don't seem to play nicely with flash.printing. If I do something like this with a VBox or VGroup:


      printJob.start2(printOptions, false);





      all I get is a blank page. Likewise, if I add a VBox or VGroup container to a Sprite and pass that to addPage, I still get no output. The only way I've been able to get any output is to add TextField controls directly to a Sprite, but this requires a lot of manual layout work, and the TextField controls aren't reliable about sizing (in fact, they're reliably too narrow for their text).


      Is there a secret to getting the higher level layout containers working with flash.printing.PrintJob? Any hint would be appreciated.