This class is the entry point for all the PDF Service utilities. These utilities can be used to perform various functions such as submitting PDFServicesJob, getting status of a PDFServicesJob, getting result of a PDFServicesJob, uploading Asset, getting content of an Asset, deleting an Asset and refreshing an Asset.

Methods provided by the utility are:

Constructors

  • Constructs a PDFServices instance with the given Credentials and ClientConfig.

    Parameters

    • params: {
          clientConfig?: ClientConfig;
          credentials: Credentials;
      }

      The parameters for constructing a PDFServices instance.

      • Optional clientConfig?: ClientConfig

        Client configuration for PDFServices.

      • credentials: Credentials

        Credentials to be used for authentication. Cannot be undefined.

    Returns PDFServices

Properties

_executionContext: ExecutionContext

Methods

  • Deletes asset from PDF Services storage.

    Parameters

    • params: {
          asset: Asset;
      }

      The parameters for deleting the asset.

      • asset: Asset

        Asset asset to be deleted. Cannot be undefined.

    Returns Promise<void>

    A promise that resolves when the asset is deleted.

    Throws

    ServiceApiError Thrown if an error is encountered while getting the content.

    Throws

    SDKError Thrown for client-side or network errors.

    Throws

    ServiceUsageError Thrown if service usage limits have been reached or credentials quota has been exhausted.

  • Returns StreamAsset for the submitted Asset.

    Parameters

    • params: {
          asset: Asset;
      }

      The parameters for getting the content.

      • asset: Asset

        The Asset for which to retrieve the content. Cannot be undefined.

    Returns Promise<StreamAsset>

    A Promise that resolves to a StreamAsset encapsulating the stream content along with the media type.

    Throws

    ServiceApiError Thrown if an error is encountered while getting the content.

    Throws

    SDKError Thrown for client-side or network errors.

    Throws

    ServiceUsageError Thrown if service usage limits have been reached or credentials quota has been exhausted.

  • Returns PDFServicesResponse for the submitted PDFServicesJob result.

    Type Parameters

    Parameters

    • params: {
          pollingURL: string;
          resultType: (new (...args) => T);
      }

      The parameters for getting the job result.

      • pollingURL: string

        The URL to be polled to get the job result. Cannot be undefined.

      • resultType: (new (...args) => T)

        result class for PDFServicesJob, it will be an implementation of PDFServicesJobResult. Cannot be undefined.

          • new (...args): T
          • Parameters

            • Rest ...args: any[]

            Returns T

    Returns Promise<PDFServicesResponse<T>>

    A Promise that resolves to a PDFServicesResponse encapsulating the result of the job.

    Throws

    ServiceApiError Thrown if an error is encountered while submitting the job.

    Throws

    SDKError Thrown for client-side or network errors.

    Throws

    ServiceUsageError Thrown if service usage limits have been reached or credentials quota has been exhausted.

  • Returns a new Asset with a new valid download URI.

    Parameters

    • params: {
          asset: Asset;
      }

      The parameters for refreshing the download URI.

      • asset: Asset

        The Asset to be refreshed. Cannot be undefined.

    Returns Promise<Asset>

    A Promise that resolves to an Asset with new valid download URI.

    Throws

    ServiceApiError Thrown if an error is encountered while getting the content.

    Throws

    SDKError Thrown for client-side or network errors.

    Throws

    ServiceUsageError Thrown if service usage limits have been reached or credentials quota has been exhausted.

  • Submits the PDFServicesJob with the given NotifierConfig and returns the polling URL.

    Parameters

    Returns Promise<string>

    A Promise that resolves to a string representing polling URL that can be used to get the status and result of the job.

    Throws

    ServiceApiError Thrown if an error is encountered while submitting the job.

    Throws

    SDKError Thrown for client-side or network errors.

    Throws

    ServiceUsageError Thrown if service usage limits have been reached or credentials quota has been exhausted.

  • Upload content from read stream and returns an Asset to be used in PDF Services SDK.

    Method will not close the read stream, responsibility of closing the read stream lies with the client.

    Parameters

    • params: {
          mimeType: string;
          readStream: ReadableStream;
      }

      The parameters for uploading an asset.

      • mimeType: string

        The mime type of the read stream. Cannot be undefined.

      • readStream: ReadableStream

        The read stream to be uploaded. Cannot be undefined.

    Returns Promise<Asset>

    A Promise that resolves to an Asset representing the uploaded content.

    Throws

    ServiceApiError Thrown if an error is encountered while submitting the job.

    Throws

    SDKError Thrown for client-side or network errors.

    Throws

    ServiceUsageError Thrown if service usage limits have been reached or credentials quota has been exhausted.

  • Uploads content from read streams and returns a list of Asset to be used in PDF Services SDK.

    Method will not close the read stream, responsibility of closing the read stream lies with the client.

    Parameters

    • params: {
          streamAssets: {
              mimeType: string;
              readStream: ReadableStream;
          }[];
      }

      The parameters for uploading assets.

      • streamAssets: {
            mimeType: string;
            readStream: ReadableStream;
        }[]

        The list of object containing read stream and mime type. Cannot be undefined.

    Returns Promise<Asset[]>

Generated using TypeDoc