I used the code below to emulate Safari's ability to scale a web page:
-(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 am facing is that when I print after zooming out and the content is smaller, it doesn’t repair: the document originally containing 4 pages is still 4 pages, but the pages are only partially full. My expectation is that the pages will be narrower and also use the full height of the paper.
To print, I use this:
[[[[wv mainFrame] frameView] documentView] print:sender];
Thoughts?
Thank! Woody
:
WWDC, , .;) , webview. " ", "", / PDF .
.