Copy link to clipboard
Copied
I have this code:
MemoryStream ms = new MemoryStream(file);
FileRef sourceFileRef = FileRef.CreateFromStream(ms, ExportPDFOperation.SupportedSourceFormat.PDF.GetMediaType());
ExportPDFToImagesOperation exportPDFToImagesOperation = ExportPDFToImagesOperation.CreateNew(ExportPDFToImagesTargetFormat.PNG);
exportPDFToImagesOperation.SetInput(sourceFileRef);
// Execute the operation.
List<FileRef> result = exportPDFToImagesOperation.Execute(executionContext);
It works perfectly except it writes all these images to the temp directory.
I'd like to avoid that overhead. Is there any way to do this using a MemoryStream?
Have something to add?