ExecutionContext

ExecutionContext

Represents the execution context of an Operation. An execution context typically consists of the desired authentication credentials and client configurations such as timeouts.

For each set of credentials, a ExecutionContext instance can be reused across operations.

Sample Usage:


const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
           .fromFile("pdfservices-api-credentials.json")
           .build();
const executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
       createPDFOperation = PDFServicesSdk.CreatePDF.Operation.createNew(),
       input = PDFServicesSdk.FileRef.createFromLocalFile('files/resources/createPDFInput.docx');

createPDFOperation.setInput(input);

createPDFOperation.execute(executionContext)
    .then(result => result.saveAsFile('output/createPDFFromZip.pdf'))
    .catch(err => console.log(err));