public class Sdk extends NativeObject
Modifier and Type | Method | Description |
---|---|---|
static HttpClientHandler |
getHttpClientHandler() |
The default handler for communication to remote servers (Getter)
|
static java.lang.String |
getProducerFullName() |
The producer string that is set within the metadata of PDF output documents (Getter)
|
static java.net.URI |
getProxy() |
Proxy to use for all communication to remote servers (Getter)
|
static java.lang.String |
getVersion() |
The version of the SDK (Getter)
|
static void |
initialize(java.lang.String license) |
Initialize the product and the license key.
|
static void |
initialize(java.lang.String license,
java.lang.String producerSuffix) |
Initialize the product and the license key.
|
static void |
setProxy(java.net.URI value) |
Proxy to use for all communication to remote servers (Setter)
|
equals, hashCode
public static void initialize(java.lang.String license) throws LicenseException, UnknownFormatException, CorruptException
license
- The license key.
The format of the license key is "<4H,V1,PDFSDK,...>"
UnknownFormatException
- The format (version) of the license
argument is unknown.CorruptException
- The license
argument is not a correct license key.LicenseException
- The license
argument can be read but the license check failed.java.lang.IllegalArgumentException
- if license
is null
public static void initialize(java.lang.String license, java.lang.String producerSuffix) throws LicenseException, UnknownFormatException, CorruptException
license
- The license key.
The format of the license key is "<4H,V1,PDFSDK,...>"
producerSuffix
- If neither null
nor empty, this string is appended to the producer string
within metadata of PDF output documents (see getProducerFullName()
).UnknownFormatException
- The format (version) of the license
argument is unknown.CorruptException
- The license
argument is not a correct license key.LicenseException
- The license
argument can be read but the license check failed.java.lang.IllegalArgumentException
- if license
is null
public static java.lang.String getVersion()
public static java.lang.String getProducerFullName()
initialize(java.lang.String)
.public static java.net.URI getProxy()
The SDK can use a proxy for all HTTP and HTTPS communication.
The default is null
, i.e. no proxy is used.
Otherwise the property’s value must be a URI with the following elements:
http[s]://[\u2039user\u203a[:\u2039password\u203a]@]\u2039host\u203a[:\u2039port\u203a]
Where:
http/https
: Protocol for connection to proxy.\u2039user\u203a:\u2039password\u203a
(optional): Credentials for connection to proxy (basic authorization).\u2039host\u203a
: Hostname of proxy.\u2039port\u203a
: Port for connection to proxy.
Example: "http://myproxy:8080"
For SSL/TLS connections, e.g. to a signature service, the proxy must allow the HTTP CONNECT
request to the remote server.
public static void setProxy(java.net.URI value)
The SDK can use a proxy for all HTTP and HTTPS communication.
The default is null
, i.e. no proxy is used.
Otherwise the property’s value must be a URI with the following elements:
http[s]://[\u2039user\u203a[:\u2039password\u203a]@]\u2039host\u203a[:\u2039port\u203a]
Where:
http/https
: Protocol for connection to proxy.\u2039user\u203a:\u2039password\u203a
(optional): Credentials for connection to proxy (basic authorization).\u2039host\u203a
: Hostname of proxy.\u2039port\u203a
: Port for connection to proxy.
Example: "http://myproxy:8080"
For SSL/TLS connections, e.g. to a signature service, the proxy must allow the HTTP CONNECT
request to the remote server.
public static HttpClientHandler getHttpClientHandler()