public static class

HTML2PDF.Proxy

extends Object
implements AutoCloseable
java.lang.Object
   ↳ com.pdftron.pdf.HTML2PDF.Proxy

Class Overview

Proxy settings to be used when loading content from web pages.

Note: These Proxy settings will only be used if type is not e_default.

Summary

Constants
int e_default The Constant e_default.
int e_http The Constant e_http.
int e_none The Constant e_none.
int e_socks5 The Constant e_socks5.
Public Constructors
Proxy()
Default constructor
Public Methods
void close()
Frees the native memory of the object.
void destroy()
Frees the native memory of the object.
void setHost(String host)
Set the proxy host to use.
void setPassword(String password)
Set the password to use when logging into the proxy with username
void setPort(int port)
Set the port number to use
void setType(int type)
Set the type of proxy to use.
void setUsername(String username)
Set the username to use when logging into the proxy
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.AutoCloseable

Constants

public static final int e_default

The Constant e_default.

Constant Value: 0 (0x00000000)

public static final int e_http

The Constant e_http.

Constant Value: 2 (0x00000002)

public static final int e_none

The Constant e_none.

Constant Value: 1 (0x00000001)

public static final int e_socks5

The Constant e_socks5.

Constant Value: 3 (0x00000003)

Public Constructors

public Proxy ()

Default constructor

Public Methods

public void close ()

Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

public void destroy ()

Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.

public void setHost (String host)

Set the proxy host to use.

Parameters
host - String defining the host name, e.g. "myserver" or "www.xxx.yyy.zzz"

public void setPassword (String password)

Set the password to use when logging into the proxy with username

Parameters
password - The password to use, e.g. "bart".

public void setPort (int port)

Set the port number to use

Parameters
port - A valid port number, e.g. 3128.

public void setType (int type)

Set the type of proxy to use.

Parameters
type - If e_default, use whatever the html2pdf library decides on. If e_none, explicitly sets that no proxy is to be used. If e_http or e_socks5 then the corresponding proxy protocol is used.

public void setUsername (String username)

Set the username to use when logging into the proxy

Parameters
username - The login name, e.g. "elbarto".