Class WebKitProxySettings
Class which represents the proxy settings of WebKit HTML converter.
Inheritance
Inherited Members
Namespace: Syncfusion.HtmlConverter
Assembly: Syncfusion.HtmlConverter.Base.dll
Syntax
public class WebKitProxySettings
Remarks
To know more details about proxy settings, refer this link.
Examples
//Initialize HTML converter
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
//Initialize WebKit converter settings
WebKitConverterSettings webKitSettings = new WebKitConverterSettings();
//Assign the WebKit path
webKitSettings.WebKitPath = @"/QtBinaries/";
//Initialize WebKit proxy settings and set the values
WebKitProxySettings proxySettings = new WebKitProxySettings();
proxySettings.UseSystemProxy = true;
//Assign the proxy settings to WebKit settings
webKitSettings.ProxySettings = proxySettings;
//Assign the WebKit settings to the converter
htmlConverter.ConverterSettings = webKitSettings;
//Convert url to pdf
PdfDocument document = htmlConverter.Convert("https://www.google.com");
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Initialize HTML converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
'Initialize WebKit converter settings
Dim webKitSettings As New WebKitConverterSettings()
'Assign the WebKit path
webKitSettings.WebKitPath = "/QtBinaries/"
'Initialize WebKit proxy settings and set the values
Dim proxySettings As New WebKitProxySettings()
proxySettings.UseSystemProxy = True
'Assign the proxy settings to WebKit settings
webKitSettings.ProxySettings = proxySettings
'Assign the WebKit settings to the converter
htmlConverter.ConverterSettings = webKitSettings
'Convert url to pdf
Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
Constructors
WebKitProxySettings()
Initializes a new instance of the WebKitProxySettings class.
Declaration
public WebKitProxySettings()
Examples
//Initialize HTML converter
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
//Initialize WebKit converter settings
WebKitConverterSettings webKitSettings = new WebKitConverterSettings();
//Assign the WebKit path
webKitSettings.WebKitPath = @"/QtBinaries/";
//Set manual proxy with proxy server host and port number.
webKitSettings.ProxySettings.HostName = "127.0.0.1";
webKitSettings.ProxySettings.PortNumber = 8080;
//Set proxy server type
webKitSettings.ProxySettings.Type = WebKitProxyType.Http;
//Set the username and password to authenticate the proxy server.
webKitSettings.ProxySettings.Username = "username";
webKitSettings.ProxySettings.Password = "password";
//Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings;
//Convert url to pdf
PdfDocument document = htmlConverter.Convert("https://www.google.com");
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Initialize HTML converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
'Initialize WebKit converter settings
Dim webKitSettings As New WebKitConverterSettings()
'Assign the WebKit path
webKitSettings.WebKitPath = "/QtBinaries/"
'Set manual proxy with proxy server host and port number.
webKitSettings.ProxySettings.HostName = "127.0.0.1"
webKitSettings.ProxySettings.PortNumber = 8080
'Set proxy server type
webKitSettings.ProxySettings.Type = WebKitProxyType.Http
'Set the username and password to authenticate the proxy server.
webKitSettings.ProxySettings.Username = "username"
webKitSettings.ProxySettings.Password = "password"
'Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings
'Convert url to pdf
Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
Properties
HostName
Gets or sets host name of proxy server
Declaration
public string HostName { get; set; }
Property Value
Type |
---|
System.String |
Remarks
To know more details about using manual proxy settings for conversion, refer this link.
Examples
//Initialize HTML converter
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
//Initialize WebKit converter settings
WebKitConverterSettings webKitSettings = new WebKitConverterSettings();
//Assign the WebKit path
webKitSettings.WebKitPath = @"/QtBinaries/";
//Set manual proxy with proxy server host and port number
webKitSettings.ProxySettings.HostName = "127.0.0.1";
webKitSettings.ProxySettings.PortNumber = 8080;
//Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings;
//Convert url to pdf
PdfDocument document = htmlConverter.Convert("https://www.google.com");
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Initialize HTML converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
'Initialize WebKit converter settings
Dim webKitSettings As New WebKitConverterSettings()
'Assign the WebKit path
webKitSettings.WebKitPath = "/QtBinaries/"
'Set manual proxy with proxy server host and port number
webKitSettings.ProxySettings.HostName = "127.0.0.1"
webKitSettings.ProxySettings.PortNumber = 8080
'Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings
'Convert url to pdf
Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
Password
Gets or sets password of proxy server; optional;
Declaration
public string Password { get; set; }
Property Value
Type |
---|
System.String |
Remarks
To know more details about using manual proxy settings for conversion, refer this link.
Examples
//Initialize HTML converter
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
//Initialize WebKit converter settings
WebKitConverterSettings webKitSettings = new WebKitConverterSettings();
//Assign the WebKit path
webKitSettings.WebKitPath = @"/QtBinaries/";
//Set manual proxy with proxy server host and port number.
webKitSettings.ProxySettings.HostName = "127.0.0.1";
webKitSettings.ProxySettings.PortNumber = 8080;
//Set the username and password to authenticate the proxy server.
webKitSettings.ProxySettings.Username = "username";
webKitSettings.ProxySettings.Password = "password";
//Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings;
//Convert url to pdf
PdfDocument document = htmlConverter.Convert("https://www.google.com");
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Initialize HTML converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
'Initialize WebKit converter settings
Dim webKitSettings As New WebKitConverterSettings()
'Assign the WebKit path
webKitSettings.WebKitPath = "/QtBinaries/"
'Set manual proxy with proxy server host and port number.
webKitSettings.ProxySettings.HostName = "127.0.0.1"
webKitSettings.ProxySettings.PortNumber = 8080
'Set the username and password to authenticate the proxy server.
webKitSettings.ProxySettings.Username = "username"
webKitSettings.ProxySettings.Password = "password"
'Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings
'Convert url to pdf
Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
PortNumber
Gets or sets port number of proxy server
Declaration
public int PortNumber { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
To know more details about using manual proxy settings for conversion, refer this link.
Examples
//Initialize HTML converter
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
//Initialize WebKit converter settings
WebKitConverterSettings webKitSettings = new WebKitConverterSettings();
//Assign the WebKit path
webKitSettings.WebKitPath = @"/QtBinaries/";
//Set manual proxy with proxy server host and port number
webKitSettings.ProxySettings.HostName = "127.0.0.1";
webKitSettings.ProxySettings.PortNumber = 8080;
//Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings;
//Convert url to pdf
PdfDocument document = htmlConverter.Convert("https://www.google.com");
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Initialize HTML converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
'Initialize WebKit converter settings
Dim webKitSettings As New WebKitConverterSettings()
'Assign the WebKit path
webKitSettings.WebKitPath = "/QtBinaries/"
'Set manual proxy with proxy server host and port number
webKitSettings.ProxySettings.HostName = "127.0.0.1"
webKitSettings.ProxySettings.PortNumber = 8080
'Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings
'Convert url to pdf
Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
Type
Gets or sets type of proxy server
Declaration
public WebKitProxyType Type { get; set; }
Property Value
Type |
---|
WebKitProxyType |
Remarks
To know more details about using manual proxy settings for conversion, refer this link.
Examples
//Initialize HTML converter
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
//Initialize WebKit converter settings
WebKitConverterSettings webKitSettings = new WebKitConverterSettings();
//Assign the WebKit path
webKitSettings.WebKitPath = @"/QtBinaries/";
//Set manual proxy with proxy server host and port number.
webKitSettings.ProxySettings.HostName = "127.0.0.1";
webKitSettings.ProxySettings.PortNumber = 8080;
//Set proxy server type
webKitSettings.ProxySettings.Type = WebKitProxyType.Http;
//Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings;
//Convert url to pdf
PdfDocument document = htmlConverter.Convert("https://www.google.com");
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Initialize HTML converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
'Initialize WebKit converter settings
Dim webKitSettings As New WebKitConverterSettings()
'Assign the WebKit path
webKitSettings.WebKitPath = "/QtBinaries/"
'Set manual proxy with proxy server host and port number.
webKitSettings.ProxySettings.HostName = "127.0.0.1"
webKitSettings.ProxySettings.PortNumber = 8080
'Set proxy server type
webKitSettings.ProxySettings.Type = WebKitProxyType.Http
'Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings
'Convert url to pdf
Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
Username
Gets or sets username of proxy server; optional;
Declaration
public string Username { get; set; }
Property Value
Type |
---|
System.String |
Remarks
To know more details about using manual proxy settings for conversion, refer this link.
Examples
//Initialize HTML converter
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
//Initialize WebKit converter settings
WebKitConverterSettings webKitSettings = new WebKitConverterSettings();
//Assign the WebKit path
webKitSettings.WebKitPath = @"/QtBinaries/";
//Set manual proxy with proxy server host and port number.
webKitSettings.ProxySettings.HostName = "127.0.0.1";
webKitSettings.ProxySettings.PortNumber = 8080;
//Set the username and password to authenticate the proxy server.
webKitSettings.ProxySettings.Username = "username";
webKitSettings.ProxySettings.Password = "password";
//Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings;
//Convert url to pdf
PdfDocument document = htmlConverter.Convert("https://www.google.com");
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Initialize HTML converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
'Initialize WebKit converter settings
Dim webKitSettings As New WebKitConverterSettings()
'Assign the WebKit path
webKitSettings.WebKitPath = "/QtBinaries/"
'Set manual proxy with proxy server host and port number.
webKitSettings.ProxySettings.HostName = "127.0.0.1"
webKitSettings.ProxySettings.PortNumber = 8080
'Set the username and password to authenticate the proxy server.
webKitSettings.ProxySettings.Username = "username"
webKitSettings.ProxySettings.Password = "password"
'Assign WebKit settings to HTML converter
htmlConverter.ConverterSettings = webKitSettings
'Convert url to pdf
Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
UseSystemProxy
Gets or sets use system proxy settings; If it is set to true WebKit converter use system proxy settings for conversion.
Declaration
public bool UseSystemProxy { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
To know more details about using system proxy settings for conversion, refer this link.
Examples
//Initialize HTML converter
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
//Initialize WebKit converter settings
WebKitConverterSettings webKitSettings = new WebKitConverterSettings();
//Assign the WebKit path
webKitSettings.WebKitPath = @"/QtBinaries/";
//Initialize WebKit proxy settings and set the values
WebKitProxySettings proxySettings = new WebKitProxySettings();
proxySettings.UseSystemProxy = true;
//Assign the proxy settings to WebKit settings
webKitSettings.ProxySettings = proxySettings;
//Assign the WebKit settings to the converter
htmlConverter.ConverterSettings = webKitSettings;
//Convert url to pdf
PdfDocument document = htmlConverter.Convert("https://www.google.com");
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Initialize HTML converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
'Initialize WebKit converter settings
Dim webKitSettings As New WebKitConverterSettings()
'Assign the WebKit path
webKitSettings.WebKitPath = "/QtBinaries/"
'Initialize WebKit proxy settings and set the values
Dim proxySettings As New WebKitProxySettings()
proxySettings.UseSystemProxy = True
'Assign the proxy settings to WebKit settings
webKitSettings.ProxySettings = proxySettings
'Assign the WebKit settings to the converter
htmlConverter.ConverterSettings = webKitSettings
'Convert url to pdf
Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)