Class PDFServices
This class is the entry point for all the PDF Service utilities.
These utilities can be used to perform various functions such as submitting PDFServices
Methods provided by the utility are:
- Upload IAsset (or Assets)
- Submit PDFServices
Job - Get status of a PDFServices
Job - Get result of a PDFServices
Job - Get content of IAsset
- Delete IAsset
- Refresh IAsset
Inheritance
Namespace: Adobe.PDFServicesSDK
Assembly: Adobe.PDFServicesSDK.Doc.dll
Syntax
public class PDFServices
Constructors
PDFServices(ICredentials)
Constructs a PDFServices instance with the given ICredentials and
Client
Declaration
public PDFServices(ICredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
ICredentials | credentials | Credentials to be used for authentication; cannot be null. |
PDFServices(ICredentials, ClientConfig)
Constructs a PDFServices instance with the given ICredentials and
Client
Declaration
public PDFServices(ICredentials credentials, ClientConfig clientConfig)
Parameters
Type | Name | Description |
---|---|---|
ICredentials | credentials | Credentials to be used for authentication; cannot be null. |
Client |
clientConfig | Client configuration for PDFServices; cannot be null. |
Methods
DeleteAsset(IAsset)
Deletes an asset from PDF Services storage.
Declaration
public void DeleteAsset(IAsset asset)
Parameters
Exceptions
Type | Condition |
---|---|
Service |
Thrown if an error is encountered while deleting the asset. |
SDKException | Thrown for client-side or network errors. |
GetContent(IAsset)
Returns the content of the asset.
Declaration
public StreamAsset GetContent(IAsset asset)
Parameters
Returns
Type | Description |
---|---|
Stream |
The Stream |
Exceptions
Type | Condition |
---|---|
Service |
Thrown if an error is encountered while getting the content. |
SDKException | Thrown for client-side or network errors. |
GetJobResult<T>(String, Type)
Returns PDFServicesResponse
for the submitted PDFServices
Declaration
public PDFServicesResponse<T> GetJobResult<T>(string pollingURL, Type resultClass)
Parameters
Type | Name | Description |
---|---|---|
System. |
pollingURL | URL to be polled to get the job result; cannot be null or empty. |
System. |
resultClass | Result class for the job; cannot be null or empty. |
Returns
Type | Description |
---|---|
PDFServices |
|
Type Parameters
Name | Description |
---|---|
T | The result class for PDFServices |
Exceptions
Type | Condition |
---|---|
Service |
Thrown if an error is encountered while getting the job result. |
SDKException | Thrown for client-side or network errors. |
GetJobStatus(String)
Returns PDFServices
Declaration
public PDFServicesJobStatusResponse GetJobStatus(string pollingURL)
Parameters
Type | Name | Description |
---|---|---|
System. |
pollingURL | URL to be polled to get the job status; cannot be null or empty. |
Returns
Type | Description |
---|---|
PDFServices |
PDFServices |
Exceptions
Type | Condition |
---|---|
Service |
Thrown if an error is encountered while getting the job status. |
RefreshDownloadURI(IAsset)
Returns a new IAsset with a new valid download URI.
Declaration
public IAsset RefreshDownloadURI(IAsset asset)
Parameters
Returns
Exceptions
Type | Condition |
---|---|
Service |
Thrown if an error is encountered while refreshing the asset. |
SDKException | Thrown for client-side or network errors. |
Submit(PDFServicesJob)
Creates the PDFServices
Declaration
public string Submit(PDFServicesJob pdfServicesJob)
Parameters
Type | Name | Description |
---|---|---|
PDFServices |
pdfServicesJob | The PDFServices |
Returns
Type | Description |
---|---|
System. |
Polling URL that can be used to get the status and result of the job. |
Exceptions
Type | Condition |
---|---|
Service |
Thrown if an error is encountered while submitting the job. |
SDKException | Thrown for client-side or network errors. |
Service |
Thrown if service usage limits have been reached or credentials quota has been exhausted. |
Submit(PDFServicesJob, IList<NotifierConfig>)
Creates the PDFServices
Declaration
public string Submit(PDFServicesJob pdfServicesJob, IList<NotifierConfig> notifierConfigList)
Parameters
Type | Name | Description |
---|---|---|
PDFServices |
pdfServicesJob | The PDFServices |
System. |
notifierConfigList | List of Notifier |
Returns
Type | Description |
---|---|
System. |
Polling URL that can be used to get the status and result of the job. |
Exceptions
Type | Condition |
---|---|
Service |
Thrown if an error is encountered while submitting the job. |
SDKException | Thrown for client-side or network errors. |
Service |
Thrown if service usage limits have been reached or credentials quota has been exhausted. |
Upload(Stream, String)
Uploads content from an input stream and returns an IAsset to be used in PDF Services SDK.
Method will not close the input stream, responsibility of closing the input stream lies with the client.
Declaration
public IAsset Upload(Stream inputStream, string mimeType)
Parameters
Type | Name | Description |
---|---|---|
System. |
inputStream | Input stream that is to be uploaded; cannot be null. |
System. |
mimeType | MIME type of the input stream; cannot be null or empty. |
Returns
Exceptions
Type | Condition |
---|---|
Service |
Thrown if an error is encountered while uploading the asset. |
SDKException | Thrown for client-side or network errors. |
Service |
Thrown if service usage limits have been reached or credentials quota has been exhausted. |
UploadAssets(List<StreamAsset>)
Uploads content from a list of Stream
Method will not close the input stream of the Stream Asset, responsibility of closing the input stream lies with the client.
Declaration
public List<IAsset> UploadAssets(List<StreamAsset> uploadAssetList)
Parameters
Type | Name | Description |
---|---|---|
System. |
uploadAssetList | List of Stream |
Returns
Type | Description |
---|---|
System. |
List of IAsset containing the assets with uploaded content. |
Exceptions
Type | Condition |
---|---|
Service |
Thrown if an error is encountered while uploading the assets. |
SDKException | Thrown for client-side or network errors. |
Service |
Thrown if service usage limits have been reached or credentials quota has been exhausted. |