public class API extends Object
pdfdata-java library.
PDFDATA.io is an API providing PDF data extraction as a service. This library, pdfdata-java, is our official Java client, providing an efficient, easy-to-use model for interacting with and using PDFDATA.io from Java, as well as from any JVM-based programming language, including Scala, Clojure, Groovy, Kotlin, JRuby, Jython, and others.
This Javadoc provides useful hints and important Java-specific documentation for
pdfdata-java, but our primary API
reference is the authoritative source for both introductory overview and advanced detailed
information on the PDFDATA.io API itself, as well as this library.
Proc proc = pdfdata.procs().configure()
.withFiles(
.withOperations(new Metadata(), new Images(), new Text(), new XMPMetadata())
.start();
| Modifier and Type | Field and Description |
|---|---|
static URL |
API_ENDPOINT
A URL indicating the default API endpoint that
API instances will use unless
otherwise configured via API.API(URL) or API.API(String, URL). |
static String |
DEFAULT_API_ENDPOINT
The URL of the default PDFDATA.io API endpoint, as a String.
|
static String |
VERSION |
| Constructor and Description |
|---|
API()
Creates a PDFDATA.io
API instance tied to the
environment-sourced API endpoint, and using an API key discovered by
obtaining the first non-null value, in order, of:
the environment variable PDFDATA_APIKEY
the system property PDFDATA_APIKEY
If an API key cannot be obtained from these sources, then this constructor will throw an
IllegalStateException. |
API(String apiKey)
Creates a PDFDATA.io
API instance with the given API key and tied to the
environment-sourced API endpoint. |
API(String apiKey,
URL endpoint)
Creates a PDFDATA.io
API instance with the given API key and tied to the specified
API endpoint. |
API(URL endpoint)
Creates a PDFDATA.io
API instance tied to the specified API endpoint, and using an
API key sourced from the environment as described here. |
| Modifier and Type | Method and Description |
|---|---|
DocumentsRequest |
documents()
Returns an API facility for working with source PDF
Documents. |
String |
getAPIKey() |
int |
getConnectTimeout() |
URL |
getEndpoint() |
int |
getReadTimeout() |
InfoRequest |
info()
Returns an API facility corresponding to the PDFDATA.io API's root informational resource.
|
static java.time.Instant |
parseDate(String s)
Parses a
String in the format used by the PDFDATA.io API (the ISO 8601 string format
that corresponds to
the standard JavaScript `Date` format). |
ProcsRequest |
procs()
|
ResourcesRequest |
resources()
|
void |
setConnectTimeout(int connectTimeout) |
void |
setReadTimeout(int readTimeout) |
public static final String DEFAULT_API_ENDPOINT
public static final URL API_ENDPOINT
API instances will use unless
otherwise configured via API.API(URL) or API.API(String, URL). This default is the
first non-null value, in order, of:
PDFDATA_ENDPOINTsystem property PDFDATA_ENDPOINTAPI.DEFAULT_API_ENDPOINTIllegalStateException.public static String VERSION
public API()
API instance tied to the
environment-sourced API endpoint, and using an API key discovered by
obtaining the first non-null value, in order, of:
PDFDATA_APIKEYsystem property PDFDATA_APIKEYIllegalStateException.public API(String apiKey)
API instance with the given API key and tied to the
environment-sourced API endpoint.public API(URL endpoint)
API instance tied to the specified API endpoint, and using an
API key sourced from the environment as described here.public void setConnectTimeout(int connectTimeout)
public void setReadTimeout(int readTimeout)
public int getConnectTimeout()
public int getReadTimeout()
public String getAPIKey()
public URL getEndpoint()
public DocumentsRequest documents()
Documents.public ProcsRequest procs()
public ResourcesRequest resources()
public InfoRequest info()
public static java.time.Instant parseDate(String s)
String in the format used by the PDFDATA.io API (the ISO 8601 string format
that corresponds to
the standard JavaScript `Date` format).java.time.format.DateTimeParseException - if s is not in the expected formatCopyright © 2017 PDFDATA.io. All rights reserved.