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'),
       createPDFOperation = PDFToolsSdk.CreatePDF.Operation.createNew(),
       input = PDFToolsSdk.FileRef.createFromLocalFile('files/resources/createPDFInput.docx');

 createPDFOperation.setInput(input);

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