--------------------------------------------------------------------
laszlo print sample code From: "Clint Dickson" <clintjd@hotmail.com>
--------------------------------------------------------------------
<canvas width="400" height="400">
<view y="50" x="50" id="myview">
<view width="50" height="50" bgcolor="blue"/>
<view width="50" height="50" bgcolor="red"/>
<simplelayout axis="x"/>
</view>
<button x="50" y="150">Print It
<method event="onclick">
// create new PrintJob object, and the print dialog to appear
var printJob = new PrintJob();
// this will wait for an OK from the dialog to print
if (printJob.start()) {
// get your view as a flash movie
var viewAsMovie = myview.__LZmovieClipRef;
//create a print area object, which will be relative to myview (just showing the blue
// and red views)
var printArea = {xMin:0, xMax:100, yMin:0, yMax:50}
// add a page to the print job with the movie
printJob.addPage(eval(viewAsMovie), printArea);
// send it to the printer
printJob.send()
}
delete printJob;
</method>
</button>
</canvas>