Export large scale print file + web file

For print pdf would be perfect. For web png/jpg.

At the moment I only get an image with saveFrame(“balls-#####.png”);

The challenge is the resolution size. For web should be smaller than print aand the images should be the same > have to be generated within one instance.