Scale the page content to fit

Suppose you want to scale the page content to fit a given page box, for example a trim box. You can scale the page content to this page box, and add extra margins, if necessary.

Figure 1. Scale the page content to fit the size of the trim box (A).