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
Asset Expiry : Assets uploaded to Adobe internal storage are transiently stored for 24 hours.
Pre-signed URI Expiry : The pre-signed URI provided for uploading or downloading the content has an expiry of 1 hour.
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.
Copied to your clipboardCreatePDFResult result = pdfServicesResponse.getResult();Asset asset = result.getAsset();// refresh the download URI in case it expires or is null for the uploaded assetAsset refreshedAsset = pdfServices.refreshDownloadURI(asset);
Copied to your clipboardconst result = pdfServicesResponse.result;const asset = result.asset;// refresh the download URI in case it expires or is null for the uploaded assetconst refreshedAsset = await pdfServices.refreshDownloadURI({asset});
Copied to your clipboardresult = pdf_services_response.getResult()asset = result.getAsset()# refresh the download URI in case it expires or is null for the uploaded assetrefreshed_asset = pdf_services.refreshDownloadURI(asset);
Copied to your clipboardCreatePDFResult result = pdfServicesResponse.Result;IAsset asset = result.Asset;// refresh the download URI in case it expires or is null for the uploaded assetpdfServices.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.
Copied to your clipboardCreatePDFResult result = pdfServicesResponse.getResult();Asset asset = result.getAsset();// delete assetpdfServices.deleteAsset(asset);
Copied to your clipboardconst result = pdfServicesResponse.result;const asset = result.asset;// delete assetawait pdfServices.deleteAsset({asset});
Copied to your clipboardcreate_pdf_result = pdf_services_response.getResult()output_asset = create_pdf_result.getAsset()# delete assetpdf_services.deleteAsset(output_asset);
Copied to your clipboardCreatePDFResult result = pdfServicesResponse.Result;IAsset asset = result.Asset;// delete assetpdfServices.deleteAsset(asset);