Printing and previewing

Martin Blackman martinblackman at
Thu Mar 15 08:56:24 CDT 2007

I think I've just found the answer to my problem. Export snapshot DOES
work with offscreen OBJECTS, not stacks. It even works with groups, so
in my example I can group all the objects on my printstack and change
the export line to :

export snapshot from rect trect of grp "PrintGrp" to pictvar as JPEG


> set the left of stack "printstack" to 2500  --off screen
> put the windowid of stack "PrintStack" into tWinID
> put "0,0,"& the width of stack "printstack" & comma & the height of
> stack "printstack" into trect
> set the rect of the templateimage to trect
> create invisible image imgname in group "Pages" of stack "PrintPreview"
> export snapshot from rect trect of window tWinID to pictvar as JPEG
> put pictvar into image imgname of stack "PrintPreview"

More information about the use-livecode mailing list