I've used the code below to emulate Safari's ability to change the scale of a webpage:
-(IBAction)changeScale:(NSControl *)sender {
[[[[wv mainFrame] frameView] documentView] setBounds:[self originalBounds]];
[[[[wv mainFrame] frameView] documentView] scaleUnitSquareToSize:NSMakeSize([sender floatValue], [sender floatValue])];
[[[[wv mainFrame] frameView] documentView] setNeedsDisplay:YES];
}
The problem I'm having is that when I print after decreasing the scale, while the content is smaller, it isn't repaginating: A document originally 4 pages long is still 4 pages, but the pages are only partially full. My expectation is that the pages would be narrower but also use the full height of the paper.
To print, I'm using this:
[[[[wv mainFrame] frameView] documentView] print:sender];
Thoughts?
Thanks! Woody