Class BlinkProxySettings
Class that represents the proxy settings of the Blink HTML converter.
Inheritance
Namespace: Syncfusion.HtmlConverter
Assembly: Syncfusion.HtmlConverter.Base.dll
Syntax
public class BlinkProxySettings : Object
Examples
//Initialize HTML converter HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.Blink); //Initialize Blink converter settings BlinkConverterSettings BlinkSettings = new BlinkConverterSettings(); //Assign the Blink path BlinkSettings.BlinkPath = "BlinkBinaries"; //Initialize Blink proxy settings and set the values BlinkProxySettings proxySettings = new BlinkProxySettings(); proxySettings.Type = BlinkProxyType.http; proxySettings.HostName = "127.0.0.1"; proxySettings.PortNumber = 8080; //Assign the proxy settings to Blink settings BlinkSettings.ProxySettings = proxySettings; //Assign the Blink settings to the converter htmlConverter.ConverterSettings = BlinkSettings; //Convert url to pdf PdfDocument document = htmlConverter.Convert("https://www.google.com"); //Save the output PDF document MemoryStream stream = new MemoryStream(); document.Save(stream);
Constructors
BlinkProxySettings()
Initializes a new instance of the BlinkProxySettings class.
Declaration
public BlinkProxySettings()
Examples
//Initialize HTML converter HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.Blink); //Initialize Blink converter settings BlinkConverterSettings BlinkSettings = new BlinkConverterSettings(); //Assign the Blink path BlinkSettings.BlinkPath = "BlinkBinaries"; //Set manual proxy with proxy server host and port number. BlinkSettings.ProxySettings.HostName = "127.0.0.1"; BlinkSettings.ProxySettings.PortNumber = 8080; //Set proxy server type BlinkSettings.ProxySettings.Type = BlinkProxyType.Http; //Assign Blink settings to HTML converter htmlConverter.ConverterSettings = BlinkSettings; //Convert url to pdf PdfDocument document = htmlConverter.Convert("https://www.google.com"); //Save the output PDF document MemoryStream stream = new MemoryStream(); document.Save(stream);
Properties
HostName
Gets or sets the host name of proxy server.
Declaration
public string HostName { get; set; }
Property Value
Type |
---|
System.String |
Examples
//Initialize HTML converter HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.Blink); //Initialize Blink converter settings BlinkConverterSettings BlinkSettings = new BlinkConverterSettings(); //Assign the Blink path BlinkSettings.BlinkPath = "BlinkBinaries"; //Set manual proxy with proxy server host and port number BlinkSettings.ProxySettings.HostName = "127.0.0.1"; BlinkSettings.ProxySettings.PortNumber = 8080; //Assign Blink settings to HTML converter htmlConverter.ConverterSettings = BlinkSettings; //Convert url to pdf PdfDocument document = htmlConverter.Convert("https://www.google.com"); //Save the output PDF document MemoryStream stream = new MemoryStream(); document.Save(stream);
Password
Gets or sets the password of proxy server; optional.
Declaration
public string Password { get; set; }
Property Value
Type |
---|
System.String |
Examples
//Initialize HTML converter HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.Blink); //Initialize Blink converter settings BlinkConverterSettings BlinkSettings = new BlinkConverterSettings(); //Assign the Blink path BlinkSettings.BlinkPath = @"/BlinkBinaries/"; //Set manual proxy with proxy server host and port number. BlinkSettings.ProxySettings.HostName = "127.0.0.1"; BlinkSettings.ProxySettings.PortNumber = 8080; BlinkSettings.ProxySettings.Username = "user"; BlinkSettings.ProxySettings.Password = "pass"; //Set proxy server type BlinkSettings.ProxySettings.Type = BlinkProxyType.Http; //Assign Blink settings to HTML converter htmlConverter.ConverterSettings = BlinkSettings; //Convert url to pdf PdfDocument document = htmlConverter.Convert("https://www.google.com"); //Save and close the PDF document MemoryStream stream = new MemoryStream(); document.Save(stream);
PortNumber
Gets or sets the port number of proxy server.
Declaration
public int PortNumber { get; set; }
Property Value
Type |
---|
System.Int32 |
Examples
//Initialize HTML converter HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.Blink); //Initialize Blink converter settings BlinkConverterSettings BlinkSettings = new BlinkConverterSettings(); //Assign the Blink path BlinkSettings.BlinkPath = "BlinkBinaries"; //Set manual proxy with proxy server host and port number BlinkSettings.ProxySettings.HostName = "127.0.0.1"; BlinkSettings.ProxySettings.PortNumber = 8080; //Assign Blink settings to HTML converter htmlConverter.ConverterSettings = BlinkSettings; //Convert url to pdf PdfDocument document = htmlConverter.Convert("https://www.google.com"); //Save the output PDF document MemoryStream stream = new MemoryStream(); document.Save(stream);
Type
Gets or sets the type of proxy server.
Declaration
public BlinkProxyType Type { get; set; }
Property Value
Type |
---|
BlinkProxyType |
Examples
//Initialize HTML converter HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.Blink); //Initialize Blink converter settings BlinkConverterSettings BlinkSettings = new BlinkConverterSettings(); //Assign the Blink path BlinkSettings.BlinkPath = "BlinkBinaries"; //Set manual proxy with proxy server host and port number. BlinkSettings.ProxySettings.HostName = "127.0.0.1"; BlinkSettings.ProxySettings.PortNumber = 8080; //Set proxy server type BlinkSettings.ProxySettings.Type = BlinkProxyType.Http; //Assign Blink settings to HTML converter htmlConverter.ConverterSettings = BlinkSettings; //Convert url to pdf PdfDocument document = htmlConverter.Convert("https://www.google.com"); //Save the output PDF document MemoryStream stream = new MemoryStream(); document.Save(stream);
Username
Gets or sets the username of proxy server; optional.
Declaration
public string Username { get; set; }
Property Value
Type |
---|
System.String |
Examples
//Initialize HTML converter HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.Blink); //Initialize Blink converter settings BlinkConverterSettings BlinkSettings = new BlinkConverterSettings(); //Assign the Blink path BlinkSettings.BlinkPath = @"/BlinkBinaries/"; //Set manual proxy with proxy server host and port number. BlinkSettings.ProxySettings.HostName = "127.0.0.1"; BlinkSettings.ProxySettings.PortNumber = 8080; BlinkSettings.ProxySettings.Username = "user"; BlinkSettings.ProxySettings.Password = "pass"; //Set proxy server type BlinkSettings.ProxySettings.Type = BlinkProxyType.Http; //Assign Blink settings to HTML converter htmlConverter.ConverterSettings = BlinkSettings; //Convert url to pdf PdfDocument document = htmlConverter.Convert("https://www.google.com"); //Save and close the PDF document MemoryStream stream = new MemoryStream(); document.Save(stream);