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 executionContext = PDFToolsSdk.ExecutionContext.createFromFile('pdftools-api-credentials.json'),
       extractPDFOperation = PDFToolsSdk.ExtractPDF.Operation.createNew(),
       input = PDFToolsSdk.FileRef.createFromLocalFile('files/resources/extractPDFInput.pdf');

 extractPDFOperation.setInput(input);

 extractPDFOperation.execute(executionContext)
     .then(result => result.saveAsFile('output/extractPdf.zip'))
     .catch(err => console.log(err));