Q: I have implemented the setScalingFactor: method of PrintInfo in order to scale my printed output. It does not seem to be having any effect--my printed output is always 100% of original size. What could be wrong?
A: Have you set your Window or View subclass to override knowsPagesFirst:last: to return YES and are you computing your own page rectangles with getRect:forPage:? Then that View is claiming that it knows how to paginate itself and the setScalingFactor: method of PrintInfo has no effect.
By not automatically scaling the printing, the AppKit allows you to decide how scaling affects pagination. Scaling by 50%, for example, should always cause the view to be 50% smaller in both directions, so what was a full-sized page now only takes up a quarter of a page. However you must decide whether each scaled page continues to be printed on a separate piece of paper or whether you group four of the scaled pages on each piece of paper.
In either case, the correct way to get your scaled view to print scaled is to override the View method addToPageSetup and use the PSscale() pswrap function to set your scaling factor appropriately:
-addToPageSetup
{
[super addToPageSetup];
PSscale(width_scale, height_scale);
return self;
}
QA683
Valid for 1.0, 2.0, 3.0