I am trying to save a word document into a stream as an AsposePdf. The document contains images. The save is failing. I can set the export folder to the temp folder and it works fine but I'd rather not have the disk filling up with images. I'd like to do it with streams but I can't seem to get it to work. Using the code below the event fires and the ImageStream is set but none of the image appear in the final pdf
MemoryStream docStream = new MemoryStream();
MemoryStream openStream = new MemoryStream(Encoding.UTF8.GetBytes(finalOutput));
Document wordDocument = new Document(openStream, null, loadFormat, null);
wordDocument.SaveOptions.PdfExportImageSaving += new ExportImageSavingEventHandler(SaveOptions_PdfExportImageSaving);
void SaveOptions_PdfExportImageSaving(object sender, ExportImageSavingEventArgs e)
// WHAT SHOULD GO IN HERE????
e.ImageStream = new MemoryStream();
Does anyone have any idea what goes in the event handler to get the image to appear in the document?
Any help is appreciated.