Created
September 16, 2021 14:16
-
-
Save cfjedimaster/29df7ce562c593612a85096aaed7f285 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exportPdfToImagesOperation.execute(executionContext) | |
.then(result => { | |
let saveFilesPromises = []; | |
for(let i = 0; i < result.length; i++){ | |
saveFilesPromises.push(result[i].saveAsFile(`output/exportPDFToJPEGOutput_${i}.jpeg`)); | |
} | |
return Promise.all(saveFilesPromises); | |
}) | |
.catch(err => { | |
if(err instanceof PDFServicesSdk.Error.ServiceApiError | |
|| err instanceof PDFServicesSdk.Error.ServiceUsageError) { | |
console.log('Exception encountered while executing operation', err); | |
} else { | |
console.log('Exception encountered while executing operation', err); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment