diff --git a/Wkhtmltopdf.NetCore/Implementation/ConvertOptions.cs b/Wkhtmltopdf.NetCore/Implementation/ConvertOptions.cs index de6f948..f6b3a13 100644 --- a/Wkhtmltopdf.NetCore/Implementation/ConvertOptions.cs +++ b/Wkhtmltopdf.NetCore/Implementation/ConvertOptions.cs @@ -12,6 +12,7 @@ public class ConvertOptions : IConvertOptions public ConvertOptions() { this.PageMargins = new Margins(); + this.EnableJavaScript = true; } /// @@ -97,6 +98,26 @@ protected string GetContentType() /// [OptionFlag("--footer-spacing")] public int? FooterSpacing { get; set; } + + /// + /// Do not allow web pages to run JavaScript + /// + /// Disabled by default + [OptionFlag("--disable-javascript")] + public bool DisableJavaScript { get; set; } + + /// + /// Allow web pages to run JavaScript + /// + [OptionFlag("--enable-javascript")] + public bool EnableJavaScript { get; set; } + + /// + /// Waits this number of milliseconds for JavaScript to finish executing + /// + /// Default is 200ms + [OptionFlag("--javascript-delay")] + public int? JavaScriptDelay { get; set; } /// /// Sets the variables to replace in the header and footer html @@ -155,4 +176,4 @@ protected string GetConvertBaseOptions() return result.ToString().Trim(); } } -} \ No newline at end of file +}