SDK Utilities

This page covers various utilities provided by the Adobe PDF Services SDKs, including operations such as refreshing download URIs, deleting assets, and streamline your workflows.

Important Note on Expiry

See our public API Reference for assets here.

Refresh Download URI

This function will create a new download URI for your asset. This is useful for scenarios where the asset needs to be downloaded after its URI has expired.

data-slots=heading, code
data-repeat=4
data-languages=Java, Node.js, Python, .NET

Java

CreatePDFResult result = pdfServicesResponse.getResult();
Asset asset = result.getAsset();

// refresh the download URI in case it expires or is null for the uploaded asset
Asset refreshedAsset = pdfServices.refreshDownloadURI(asset);

Node.js

const result = pdfServicesResponse.result;
const asset = result.asset;

// refresh the download URI in case it expires or is null for the uploaded asset
const refreshedAsset = await pdfServices.refreshDownloadURI({asset});

Python

result = pdf_services_response.getResult()
asset = result.getAsset()

# refresh the download URI in case it expires or is null for the uploaded asset
refreshed_asset = pdf_services.refreshDownloadURI(asset);

.NET

CreatePDFResult result = pdfServicesResponse.Result;
IAsset asset = result.Asset;

// refresh the download URI in case it expires or is null for the uploaded asset
pdfServices.RefreshDownloadURI(asset);

Delete Asset

This function deletes an asset from Adobe internal storage. If you prefer not to store your asset on Adobe's storage, where assets are transiently stored for 24 hours, you can use this function to delete the asset immediately.

data-slots=heading, code
data-repeat=4
data-languages=Java, Node.js, Python, .NET

Java

CreatePDFResult result = pdfServicesResponse.getResult();
Asset asset = result.getAsset();

// delete asset
pdfServices.deleteAsset(asset);

Node.js

const result = pdfServicesResponse.result;
const asset = result.asset;

// delete asset
await pdfServices.deleteAsset({asset});

Python

create_pdf_result = pdf_services_response.getResult()
output_asset = create_pdf_result.getAsset()

# delete asset
pdf_services.deleteAsset(output_asset);

.NET

CreatePDFResult result = pdfServicesResponse.Result;
IAsset asset = result.Asset;

// delete asset
pdfServices.deleteAsset(asset);