public void PrintGoogle() { var pdf = new GeckoPdf(new GeckoPdfConfig()); var bytes = pdf.Convert("https://google.com"); Assert.IsTrue(bytes.Length > EmptyDocLength); GeckoPdf.UnloadGecko(); }
public void PrintMultipleSitesAtOnce() { var sites = new string[] { "https://google.com", "https://www.w3.org", "https://www.microsoft.com", "https://github.com/", "https://www.mozilla.org" }; foreach (var site in sites) { Task.Run(() => { var pdf = new GeckoPdf(new GeckoPdfConfig()); var bytes = pdf.Convert(site); Assert.IsTrue(bytes.Length > EmptyDocLength); }); } }