DeliveryConfirmationsDialog: small fixes
This commit is contained in:
@ -80,13 +80,14 @@ namespace Elwig.Documents {
|
||||
if (this is MergedDocument m) {
|
||||
var pdf = new TempFile("pdf");
|
||||
var tmpHtmls = new List<TempFile>();
|
||||
var n = 0;
|
||||
var n = m.Documents.Count();
|
||||
int i = 0;
|
||||
foreach (var doc in m.Documents) {
|
||||
var tmpHtml = new TempFile("html");
|
||||
await File.WriteAllTextAsync(tmpHtml.FilePath, await doc.Render(), Utils.UTF8);
|
||||
tmpHtmls.Add(tmpHtml);
|
||||
n++;
|
||||
progress?.Report(50.0 * n / m.Documents.Count());
|
||||
i++;
|
||||
progress?.Report(50.0 * i / n);
|
||||
}
|
||||
progress?.Report(50.0);
|
||||
await Pdf.Convert(tmpHtmls.Select(f => f.FilePath), pdf.FilePath, new Progress<double>(v => progress?.Report(50.0 + v / 2)));
|
||||
|
Reference in New Issue
Block a user