In psuedo events it should be this:
On click
--- set viewport size to (layoutwidth, layoutheight)
--- wait 0 seconds
--- snapshot canvas as png
On snapshot
--- browser: invoke download snapshoturl
--- set viewport size to (640, 480)
The wait is so the runtime has a chance to do the change, since it's delayed till the end of a tick.
If it doesn't work, then i guess it doesn't work. I don't know if the scaling mode, the export method, or anything else has a bearing on it not working. I've had it work in the cases I've tested, but I don't recall what they were.