HTML Air App: Printing HTML element
Hi,
I'm looking to build an HTML Air App that will need to render and then print a section of html. Does anyone know how to convert that HTML to a sprite so we can use flash.printing.PrintJob?
Here's what I have so far that I KNOW is completely busted.
<html>
<head>
<title>Print Badge</title>
<script type="text/javascript" src="AIRAliases.js"></script>
<script type="text/javascript">
function appLoad(){
var pj = new window.runtime.flash.printing.PrintJob;
if ( pj.start2(null,true) ) {
var sp = new window.runtime.flash.display.BitmapData(400,300, false);
sp.draw(nativeWindow.stage);
var poptions = new window.runtime.flash.printing.PrintJobOptions;
poptions.printAsBitmap = true;
pj.addPage(sp,null,poptions);
pj.send();
}
}
</script>
</head>
<body onLoad="appLoad()">
<table width="400" height="300" id="badge">
<tr>
<td>John Doe</td>
</tr>
<tr>
<td>Test Company</td>
</tr>
</table>
</body>
</html>
