Hey all,
I have a custom class that inherits off NSView and I want to be able to print it. I want it to cover the whole of one page when it prints, so I overrode the print: function as so:-
However it does not cover the whole page. What am I doing wrong?
Chris
I have a custom class that inherits off NSView and I want to be able to print it. I want it to cover the whole of one page when it prints, so I overrode the print: function as so:-
Code:
// Make sure we use all of the page when printing
- (void)print:(id)sender
{
NSPrintOperation *op = [NSPrintOperation currentOperation];
NSPrintInfo *pInfo = [op printInfo];
[pInfo setHorizontalPagination:NSFitPagination];
[pInfo setVerticalPagination:NSFitPagination];
[op setPrintInfo:pInfo];
// Continue printing
[super print:sender];
}
However it does not cover the whole page. What am I doing wrong?
Chris