Copy link to clipboard
Copied
Just a quick tip. Our docs explain how to use a custom timeout w/ the SDKs when calling services: https://developer.adobe.com/document-services/docs/overview/pdf-services-api/howtos/#custom-timeout-.... What we don't show is how to *use* that clientConfig object. It's really simple though - you pass it to your ExecutionContext creation call. Here's an example in Node, and it should be similar in your SDK of choice.
const credentials = PDFServicesSdk.Credentials
.serviceAccountCredentialsBuilder()
.fromFile('pdftools-api-credentials.json')
.build();
// set time outs to 2 minutes
const clientConfig = PDFServicesSdk.ClientConfig
.clientConfigBuilder()
.withConnectTimeout(1200000)
.withReadTimeout(1200000)
.build();
// Create an ExecutionContext using credentials
const executionContext = PDFServicesSdk.ExecutionContext.create(credentials, clientConfig);
As an FYI, I've filed an issue internally to update our docs to mention this.
Have something to add?