Printer Settings

When in Portrait A4 from PrinterSetup

PageWidth = 595
Width = 559
PageLeft = -18

So (842-595)/2 = 18

This seems correct as border is 18 on left and right

Now Consider Landscape A4 from PrinterSetup

PageWidth = 842
Width = 783
PageLeft = -18

So (842 -783)/2 = 29.5

Should the PageLeft be adjusted when you select Landscape in the print dialogue box so it is -29 and not -18?

All the best

Terry

Answering to self and looking for clarification:

To print centrally I have calculated a couple of offsets:

pPrintLeftOffset = (tPrintSetup.PageWidth - tPrintSetup.Width)/2 - abs(tPrintSetup.PageLeft)
pPrintTopOffset = (tPrintSetup.PageHeight - tPrintSetup.Height)/2 - abs(tPrintSetup.PageTop)

Then to print rectangle:

g.DrawRect(pLeftMargin + pPrintLeftOffset ,pTopMargin + pPrintTopOffset,pWidth,pHeight)

pTopMargin and pLeftMargin are my margins.

Is this the correct way to correct for the PrintSetup unequal margins?

All the best

Terry