From 2bf850bc5503004b6225b56259c834783eb9e706 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Thu, 28 Sep 2023 20:05:29 +0200 Subject: [PATCH] Documents/Pdf: Add /s to PdfToPrinter call --- Elwig/Documents/Pdf.cs | 1 + Elwig/Windows/DeliveryAdminWindow.xaml.cs | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Elwig/Documents/Pdf.cs b/Elwig/Documents/Pdf.cs index bed37ff..4835c0f 100644 --- a/Elwig/Documents/Pdf.cs +++ b/Elwig/Documents/Pdf.cs @@ -59,6 +59,7 @@ namespace Elwig.Documents { public static async Task Print(string path, int copies = 1) { var p = new Process() { StartInfo = new() { FileName = PdfToPrinter } }; p.StartInfo.ArgumentList.Add(path); + p.StartInfo.ArgumentList.Add("/s"); p.StartInfo.ArgumentList.Add($"copies={copies}"); p.Start(); await p.WaitForExitAsync(); diff --git a/Elwig/Windows/DeliveryAdminWindow.xaml.cs b/Elwig/Windows/DeliveryAdminWindow.xaml.cs index ebf5d59..2faa6f3 100644 --- a/Elwig/Windows/DeliveryAdminWindow.xaml.cs +++ b/Elwig/Windows/DeliveryAdminWindow.xaml.cs @@ -890,8 +890,7 @@ namespace Elwig.Windows { if (App.Config.Debug) { doc.Show(); } else { - await doc.Print(2); - Activate(); + doc.Print(2); } } FinishButton.Cursor = null;