• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

PDF to Image with stream

New Here ,
Apr 02, 2023 Apr 02, 2023

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?

TOPICS
.NET SDK , PDF Services API

Views

140

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources