Document: Fix GenerationProportion
This commit is contained in:
@ -97,10 +97,10 @@ namespace Elwig.Documents {
|
||||
await File.WriteAllTextAsync(tmpHtml.FilePath, await doc.Render(), Utils.UTF8);
|
||||
tmpHtmls.Add(tmpHtml);
|
||||
i++;
|
||||
progress?.Report(GenerationProportion * i / n);
|
||||
progress?.Report(GenerationProportion * 100 * i / n);
|
||||
}
|
||||
progress?.Report(GenerationProportion);
|
||||
await Pdf.Convert(tmpHtmls.Select(f => f.FileName), pdf.FileName, DoubleSided, new Progress<double>(v => progress?.Report(GenerationProportion + v * (1 - GenerationProportion))));
|
||||
progress?.Report(GenerationProportion * 100);
|
||||
await Pdf.Convert(tmpHtmls.Select(f => f.FileName), pdf.FileName, DoubleSided, new Progress<double>(v => progress?.Report(GenerationProportion * 100 + v * (1 - GenerationProportion))));
|
||||
foreach (var tmp in tmpHtmls) {
|
||||
tmp.Dispose();
|
||||
}
|
||||
|
Reference in New Issue
Block a user