WeasyPrint-netcore icon indicating copy to clipboard operation
WeasyPrint-netcore copied to clipboard

dos windows flash out when use in WinForm

Open qq57941500 opened this issue 3 years ago • 1 comments

first of all, thanks a lot for this .net wrapper, very handy to use. I tried to test it from a winform application, it shows up a black command line window quickly and closes automatically. is there a solution to this issue?

private async void button1_Click(object sender, EventArgs e) { using (WeasyPrintClient client = new WeasyPrintClient(trace)) { var html = "<!DOCTYPE html><html><body><h1>Hello World</h1></body></html>"; var fileContent = await client.GeneratePdfAsync(html); File.WriteAllBytes(@"D:\TT\temp\test.pdf", fileContent); } }

qq57941500 avatar May 08 '21 15:05 qq57941500