Print problems

I have a GoView with Sheet of size (2102, 1502) and 1 pixel margins.
The Sheet top-left corner is set to be (-1, -1).
The overrided GoDocument has size (2100, 1500).
I want to print the whole document in one landscape A4 page.
Problems:

  1. GoSheet is not printed, either its bound or shadows, event its Printable is true. Overriding PrintDecoration?
  2. If I change the PrintScale property to fit the document into one page, the graph in the window also be affected. Sepecifically, when PrintScale set to be a smaller value, such as 0.45 in my case, the sheet and document in the window expand towards to right-bottom.
    I thought PrintScale only affected printing, not painting, or sheet/document size, but it’s not the case.
    So my questions:
  3. How can I print the same kind of boundary which we can see in the window drawn by GoSheet?
  4. Is there any better ways to fit a GoDocument in one page? Where is the best place to do this fitting? I need to print one document in one page, so I calculated PrintScale in overrided PrintDocumentPage method.
  5. How can I keep the painted view in the window unaffected (sheet and document sizes) when PrintScale changes? Maybe changing PrintScale is not the correct way to do the fitting.

The intent of GoSheet is to represent a sheet of paper, so you wouldn’t expect that object to be printed, since the color and possibly the grid lines or “letterhead” would already be there.
Furthermore, the GoSheet margins are intended for the user to see where the printing region is and where the non-printing marginal areas are. So you wouldn’t expect to print the margins either. And of course there’s no way to print the shadow, since printers cannot print beyond the edge of the paper.
Since the GoView.Sheet is supposed to represent the sheet of paper, and because setting GoView.PrintScale changes the absolute size of the GoObjects that are printed, setting GoView.PrintScale also adjusts the size of the GoView.Sheet accordingly, so that the proportions are maintained between the objects and the sheet. Perhaps you want to change the value of GoView.SheetStyle so it tries to automatically set the GoView.DocScale so that the Width or Height or whole sheet will fit in the view’s display rectangle.
If you want your printed objects to fit in a page, you can either calculate the value for GoView.PrintScale just before calling Print or PrintPreview, or you can override the GoView.PrintScale getter.
You could set GoView.PrintsViewObjects to true, but that wouldn’t print anything in the sheet margins, since those areas are beyond where the printer can print.
If you really want to print a representation of a sheet on your sheet of paper, you might try not setting GoView.BackgroundHasSheet at all. Instead, you could just create a GoSheet object and add it to your document, presumably in a new layer that you keep furthest “back”.
If you want to change how much of your document gets printed, then changing the value of GoView.PrintScale is the right thing to do. However, since the GoView.Sheet represents the sheet of paper, the relationship between your GoObjects and the GoView.Sheet has to change somehow – that’s what’s happening in the printer, after all.

Many thanks, walter. I’m now much clearer about printing.