Hi Mark,This code has not been tested on lps-4 +. It works on lps 3.4,
however. Let me know if you get it to work for lps 4.Best,Clint> Date: Wed, 18
Jul 2007 14:50:17 +0200> From: [EMAIL PROTECTED]> To:
[email protected]> Subject: Re: [Laszlo-user] Printing and others> CC:
[EMAIL PROTECTED]> > hi all/clint,> > I'm trying this example, but I cannot get
'myview' to come out of the> printer. when I change the addPage arguments to
("global", printArea,> {printAsBitmap:true}) the whole canvas prints fine..
gliffy also works> no problems.> > I'd be most happy if anyone has an idea what
the problem might be..?> > (I'm using lps-4.0.2 and firefox with flash player 9
under ubuntu).> > > <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>> > > thanks in
advance,> mark dufour.> -- > "One of my most productive days was throwing away
1000 lines of code"> - Ken Thompson
_________________________________________________________________
Missed the show? Watch videos of the Live Earth Concert on MSN.
http://liveearth.msn.com