Printing/Pdf: Set CreateNoWindow to true
All checks were successful
Test / Run tests (push) Successful in 2m6s

This commit is contained in:
2024-07-23 11:42:23 +02:00
parent 84f772a32f
commit d741ba92dc

View File

@ -94,7 +94,11 @@ namespace Elwig.Helpers.Printing {
public static async Task Print(string path, int copies = 1) {
try {
var p = new Process() { StartInfo = new() { FileName = PdfToPrinter } };
var p = new Process() { StartInfo = new() {
FileName = PdfToPrinter,
CreateNoWindow = true,
UseShellExecute = false,
} };
p.StartInfo.ArgumentList.Add(path);
p.StartInfo.ArgumentList.Add("/s");
p.StartInfo.ArgumentList.Add($"copies={copies}");