diff --git a/MainWindow.axaml.cs b/MainWindow.axaml.cs index 26370b1..974538c 100644 --- a/MainWindow.axaml.cs +++ b/MainWindow.axaml.cs @@ -781,18 +781,25 @@ public partial class MainWindow : Window DefaultExtension = "pdf", Filters = { new FileDialogFilter { Name = "PDF-Dateien", Extensions = { "pdf" } } } }; + + // hier nach winpafd prüfen var filePath = await saveDialog.ShowAsync(this); 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); - builder.CreateAddressLabelPdfFromAddressSetWithPlaceholder(( - (KasAddressList)LstCustomerAdressSets.SelectedItem).ID, + builder.CreateAddressLabelPdfFromAddressSetWithPlaceholder( + ((KasAddressList)LstCustomerAdressSets.SelectedItem).ID, "Company Logo/Info", filePath ); - //return true; } }