NSPrintInfo changed in macOS Sierra

I have an application derived from the Xcode Cocoa Application template that prints properly on El Capitan, but introduces a centimetre margin all round with a shadow box on Sierra. Changing the margin values (in the shared instance in viewDidLoad of the viewController) to larger positive values makes the margins bigger, but reducing them to zero still leaves the margin and shadow box. The image is a screen-shot of the print preview. I would like to go back to having the PDF take up the whole printed page. Looking at the menu for the File/Print shows it executes firstResponder print:. Should I try to override this function? But if the code below is being executed to no effect, what good will this do?