Small fixes
This commit is contained in:
@ -14,7 +14,7 @@ namespace WGneu.Print {
|
||||
private static readonly string CHROMIUM = @"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe";
|
||||
private static IBrowser? Browser = null;
|
||||
|
||||
public static async void Init() {
|
||||
public static async Task Init() {
|
||||
Browser = await Puppeteer.LaunchAsync(new LaunchOptions {
|
||||
Headless = true,
|
||||
ExecutablePath = CHROMIUM,
|
||||
@ -23,7 +23,7 @@ namespace WGneu.Print {
|
||||
|
||||
public static async Task Convert(string path_html, string path_pdf) {
|
||||
if (Browser == null)
|
||||
Init();
|
||||
await Init();
|
||||
|
||||
using var page = await Browser?.NewPageAsync();
|
||||
await page.GoToAsync("file://" + path_html);
|
||||
|
Reference in New Issue
Block a user