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);
|
await File.WriteAllTextAsync(tmpHtml.FilePath, await doc.Render(), Utils.UTF8);
|
||||||
tmpHtmls.Add(tmpHtml);
|
tmpHtmls.Add(tmpHtml);
|
||||||
i++;
|
i++;
|
||||||
progress?.Report(GenerationProportion * i / n);
|
progress?.Report(GenerationProportion * 100 * i / n);
|
||||||
}
|
}
|
||||||
progress?.Report(GenerationProportion);
|
progress?.Report(GenerationProportion * 100);
|
||||||
await Pdf.Convert(tmpHtmls.Select(f => f.FileName), pdf.FileName, DoubleSided, new Progress<double>(v => progress?.Report(GenerationProportion + v * (1 - GenerationProportion))));
|
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) {
|
foreach (var tmp in tmpHtmls) {
|
||||||
tmp.Dispose();
|
tmp.Dispose();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user