About printing

I create a rectangle node.
The size of the rectangle is the area I want to print.
At the same time, the rectangle node can be printed out, instead of just printing the drawing area inside the rectangle.
Select the print area by creating the rectangle node.How do I do that?

First, I hope you have already read GoJS Making SVG -- Northwoods Software or GoJS Making Images -- Northwoods Software and then GoJS Printing -- Northwoods Software.

If you look at the options that you can pass to Diagram.makeSvg or Diagram.makeImage at makeImageData, you will see that you can control the area that is rendered, in document coordinates, by specifying the scale and position properties.