From 134a7ba85df85fb8f1b8f8ca3e3cc57745d0f5b9 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 4 Feb 2020 11:25:12 -0600 Subject: [PATCH] eeschema: Temporary fix for GTK printing offset The full fix will be Cairo printing in v6 Fixes https://gitlab.com/kicad/code/kicad/issues/1907 --- eeschema/dialogs/dialog_print_using_printer.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index c5d1105bcc..80330b39c1 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -371,7 +371,23 @@ void SCH_PRINTOUT::PrintPage( SCH_SCREEN* aScreen ) bool printReference = m_parent->GetPrintSheetReference(); pageSizeIU = aScreen->GetPageSettings().GetSizeIU(); +#ifdef __WXGTK__ + if( pageSizeIU.x > pageSizeIU.y ) + { + auto psd = m_parent->GetPageSetupData(); + psd.SetMarginTopLeft( wxPoint( 0, 3 ) ); + psd.SetMarginBottomRight( wxPoint( 0, 5 ) ); + FitThisSizeToPageMargins( pageSizeIU, psd ); + } + else + { + FitThisSizeToPaper( pageSizeIU ); + } + +#else FitThisSizeToPaper( pageSizeIU ); +#endif + fitRect = GetLogicalPaperRect(); wxLogDebug( wxT( "Fit rectangle: x = %d, y = %d, w = %d, h = %d" ),