Hi,
I'm workink with HtmlToPdfConverter to create a invoice PDF.
I have this invoice in HTML and work very well, but when I try converter dont work.
I try another https pages and work well, but in my site don't work.
I tried these web pages:
- https://www.google.com.br
- https://www.microsoft.com.br
I use Azure Web Apps and Blazor and I try converter others azure websites and worked very well.
I have OPENSSL in my project too.
My code:
MemoryStream stream = new MemoryStream();
//Initialize HTML to PDF converter
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();
WebKitConverterSettings settings = new WebKitConverterSettings();
//Set WebKit path
settings.WebKitPath = Startup.contentRootPath + @"\Biblio\QtBinariesDotNetCore\";
//Assign WebKit settings to HTML converter
settings.AdditionalDelay = 3000;
htmlConverter.ConverterSettings = settings;
//Convert HTML to PDF.
string url = "https://webclient.irineu.dev.sic360.com/";
PdfDocument document = htmlConverter.Convert(url);
//Save and close the document instance.
document.Save(stream);
document.Close(true);
stream.Position = 0;