[fix?:] windows file path for label export?

This commit is contained in:
2026-05-15 18:34:25 +02:00
parent 474b628f0b
commit 68541621d9
+10 -3
View File
@@ -781,18 +781,25 @@ public partial class MainWindow : Window
DefaultExtension = "pdf", DefaultExtension = "pdf",
Filters = { new FileDialogFilter { Name = "PDF-Dateien", Extensions = { "pdf" } } } Filters = { new FileDialogFilter { Name = "PDF-Dateien", Extensions = { "pdf" } } }
}; };
// hier nach winpafd prüfen
var filePath = await saveDialog.ShowAsync(this); var filePath = await saveDialog.ShowAsync(this);
if (!string.IsNullOrEmpty(filePath)) if (!string.IsNullOrEmpty(filePath))
{ {
if (Uri.TryCreate(filePath, UriKind.Absolute, out var uri)
&& uri.IsFile)
{
filePath = uri.LocalPath;
}
var builder = new PdfBuilder(Settings._instance.pdfExport); var builder = new PdfBuilder(Settings._instance.pdfExport);
builder.CreateAddressLabelPdfFromAddressSetWithPlaceholder(( builder.CreateAddressLabelPdfFromAddressSetWithPlaceholder(
(KasAddressList)LstCustomerAdressSets.SelectedItem).ID, ((KasAddressList)LstCustomerAdressSets.SelectedItem).ID,
"Company Logo/Info", "Company Logo/Info",
filePath filePath
); );
//return true;
} }
} }