Printing/Pdf: Wait for WinziPrint to be ready

This commit is contained in:
2024-03-05 17:18:59 +01:00
parent d944aabc06
commit 5a488369be
2 changed files with 2 additions and 1 deletions

View File

@ -33,12 +33,13 @@ namespace Elwig.Helpers.Printing {
FileName = WinziPrint, FileName = WinziPrint,
CreateNoWindow = true, CreateNoWindow = true,
UseShellExecute = false, UseShellExecute = false,
RedirectStandardOutput = true,
} }; } };
p.StartInfo.ArgumentList.Add("-D"); p.StartInfo.ArgumentList.Add("-D");
p.StartInfo.ArgumentList.Add("-d"); p.StartInfo.ArgumentList.Add("-d");
p.StartInfo.ArgumentList.Add(App.TempPath); p.StartInfo.ArgumentList.Add(App.TempPath);
p.Start(); p.Start();
await Task.Delay(2000); await p.StandardOutput.ReadLineAsync();
WinziPrintProc = p; WinziPrintProc = p;
evtHandler?.Invoke(); evtHandler?.Invoke();
} }

Binary file not shown.