We have a static method that returns pdf bytes but there is uncertain times the pdf it generates is blank/distorted. Trying to figure out if an instance of an html to PDF generator being inside a static method causes the output to fail by not being able to generate the expected content in the pdf.
Sample:
public class EvoPDFUtility
{
public static byte[] ConvertHtmlToPdf(string html)
{
var htmlToPdfGenerator = new EvoPDF();
return htmlToPdfGenerator.Convert(html);
}
}
Is the instance inside the static method becomes shared to and the same everytime the static method is called?