Hi,
I am a newbie in Adobe AIR, and am trying to print a HTML from my air app, however, this HTML should never be seen on screen. I am using HTMLLoader for this, as per some sample I saw on the web.
What happens, is that there is a print dialog, but it prints out a blank page.
If this is a window application, and I click some button to print (just the HTMLLoader) it gets printed.
Following is my code.
var mySprite:Sprite = new mySprite()
var loader:HTMLLoader = new HTMLLoader()
loader.loadString("ADDRESS
Thu Aug 20 21:37:20 GMT+0530 2009
")
var html:HTML = new HTML()
html.htmlLoader = loader
mySprite.addChild(html);
//After this its pretty standard
var pJob:PrintJob = new PrintJob(); html.width = pJob.pageWidth html.height = pJob.pageHeight loader.height = pJob.pageHeight loader.width = pJob.pageWidth
if(!pJob.start()) { throw new PrintingCanceled(" User Canceled Printing"); } pJob.addPage(loader, null); pJob.send();
Please let me know what I'm missing. Any help, or suggestions are welcome.