I am using SelectPDF to generate pdfs from a cshtml template. My PDF generates locally, but when on production I get an error.
Stack trace: at SelectPdf.HtmlToImage.?(String A_0, String A_1, String A_2, ?[]& A_3, ?& A_4)\r\n at SelectPdf.HtmlToPdf.?(String A_0, String A_1, String A_2, String A_3, Boolean A_4)\r\n at SelectPdf.HtmlToPdf.ConvertHtmlString(String htmlString)\r\n at Test.GenerateSelectPDF(ReportObj report)\r\n at Test.ReportsController.d__6.MoveNext()
I've ensured that the dll, Select.Pdf.dll and Select.Html.dep are in my bin folder along with Select.Pdf.xml and Select.Tools.dep.
Since I can generate the same report locally I think this is a configuration issue.
Check the execution by increasing the MaxPageLoadTime property of the converter (HTMLToPDF object)
By default, the value is 60 seconds
Example:
converter.Options.MaxPageLoadTime = 240;
Reference: Link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With