I searched on the Internet but could not find a solution for my problem:
I want to print headers and footers when printing my WebView.
[printInfoDict setObject:[NSNumber numberWithBool:YES] forKey:NSPrintHeaderAndFooter]; NSView* viewToPrint = [[[self.webViewController.webView mainFrame] frameView] documentView]; NSPrintOperation* printOp = [NSPrintOperation printOperationWithView:viewToPrint printInfo:printInfo];
Footers / headers are not currently printed. In addition, I want to add my own Footer / Header (this is possible by overriding the NSView -(void) pageHeader and -(void) pageFooter ).
I have no idea how to achieve this. Thank you for your help.
source share