[fix?:] trying
This commit is contained in:
+22
-3
@@ -773,25 +773,36 @@ public partial class MainWindow : Window
|
||||
}
|
||||
|
||||
private async void BtnStartGenerateLabels_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
SavePdfExportOptions();
|
||||
|
||||
var saveDialog = new SaveFileDialog
|
||||
{
|
||||
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);
|
||||
|
||||
Console.WriteLine($"RAW: {filePath}");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(filePath))
|
||||
{
|
||||
if (filePath.StartsWith("file://"))
|
||||
{
|
||||
filePath = new Uri(filePath).LocalPath;
|
||||
}
|
||||
Console.WriteLine(filePath);
|
||||
|
||||
Console.WriteLine($"PATH: {filePath}");
|
||||
|
||||
var builder = new PdfBuilder(Settings._instance.pdfExport);
|
||||
|
||||
@@ -800,6 +811,14 @@ public partial class MainWindow : Window
|
||||
"Company Logo/Info",
|
||||
filePath
|
||||
);
|
||||
|
||||
Console.WriteLine("PDF OK");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex);
|
||||
File.WriteAllText("crash.txt", ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user