I've just upgraded to the latest version of EO.Pdf (v16.2.23.0) and I've noticed that the javascript is executing even though I pass through the pdf option NoScript = true.
I have only referenced in the EO.Pdf.dll.
Code: C#
var pdfStream = new MemoryStream();
var pdfOption = new HtmlToPdfOptions
{
NoScript = true,
OutputArea = new RectangleF(0, 0, PdfPageSizes.A4.Height, PdfPageSizes.A4.Width),
PageSize = new SizeF(PdfPageSizes.A4.Height, PdfPageSizes.A4.Width),
ZoomLevel = 1.312f
};
HtmlToPdf.ConvertHtml(html, pdfStream, pdfOption);
I've also tried to set NoScript globally using the following code with no difference in result.
Code: C#
HtmlToPdf.Options.NoScript = true;
It seems as if the NoScript setting is being ignored. I've tested with and without and am returned with the same result.
A work around for this has been to include the EO.Pdf.Classic dll file and add the line
HtmlToPdf.UseClassicEngine(); However I'm not quite happy with this solution and I think there may be a bug in the system.
Any ideas if this is a bug or am I configuring it incorrectly?