I have the following method to AirPrint (e.g. show print dialog) on a WKWebView, using Swift. It will pop up the print dialog, and will format text correctly across multiple pages if needed. I call printPage from my "Print" button on the app.
webViewX is a WKWebView, defined elsewhere in the class:
var webViewX: WKWebView!
//do all the work for populating the webViewX somewhere else in the class
@objc func printPage(sender: AnyObject)
{
let pInfo :UIPrintInfo = UIPrintInfo.printInfo()
pInfo.outputType = UIPrintInfo.OutputType.general
pInfo.jobName = self.title //page title defined elsewhere
pInfo.orientation = UIPrintInfo.Orientation.portrait
let printController = UIPrintInteractionController.shared
printController.printInfo = pInfo
printController.printFormatter = webViewX.viewPrintFormatter()
printController.present(animated: true, completionHandler: nil)
}