From 8be7d5545b444323576c193350e1431d1203f07c Mon Sep 17 00:00:00 2001 From: Curtis Wensley Date: Sat, 9 Jan 2021 16:34:37 -0800 Subject: [PATCH] Mac: Use proper print margins for WKWebView Fixes #1873 --- src/Eto.Mac/Forms/Controls/WKWebViewHandler.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Eto.Mac/Forms/Controls/WKWebViewHandler.cs b/src/Eto.Mac/Forms/Controls/WKWebViewHandler.cs index 0501a7f888..11a91a705e 100644 --- a/src/Eto.Mac/Forms/Controls/WKWebViewHandler.cs +++ b/src/Eto.Mac/Forms/Controls/WKWebViewHandler.cs @@ -299,7 +299,15 @@ public void LoadHtml(string html, Uri baseUri) public void ShowPrintDialog() { - var printInfo = NSPrintInfo.SharedPrintInfo; + const float margin = 24f; + var printInfo = new NSPrintInfo + { + VerticallyCentered = false, + LeftMargin = margin, + RightMargin = margin, + TopMargin = margin, + BottomMargin = margin + }; NSPrintOperation printOperation = null; if (Control.RespondsToSelector(s_selGetPrintOperation))