Add Utils.RunBackground
This commit is contained in:
@ -39,7 +39,7 @@ namespace WGneu.Documents {
|
||||
if (Browser == null) throw new InvalidOperationException("The puppeteer engine has not been initialized yet");
|
||||
using var page = await Browser.NewPageAsync();
|
||||
page.Console += OnConsole;
|
||||
await page.GoToAsync("file://" + htmlPath);
|
||||
await page.GoToAsync($"file://{htmlPath}");
|
||||
await page.EvaluateFunctionAsync("async () => { await window.PagedPolyfill.preview(); }");
|
||||
await page.PdfAsync(pdfPath, new() {
|
||||
PreferCSSPageSize = true,
|
||||
|
Reference in New Issue
Block a user