We're sorry AsposeApp doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.app

Did not convert from memory stream to pdf If memory stream have some graph/chart

I am using the below code to convert pdf from a word document/memory stream. but when I try to open the pdf which is generated by code the PDF did not open and shows the message “We can not open this file…something went wrong.” Please help me to sort out that issue.

MemoryStream objMemoryStream = new MemoryStream(document.FileData);
Aspose.Words.License license = new Aspose.Words.License();
Aspose.Words.Document doc = new Aspose.Words.Document(objMemoryStream);
Aspose.Words.Saving.PdfSaveOptions saveOption = new Aspose.Words.Saving.PdfSaveOptions
Compliance = Aspose.Words.Saving.PdfCompliance.PdfA1b,
SaveFormat = Aspose.Words.SaveFormat.Pdf,
MemoryOptimization = true
doc.Save(tempFilePath, saveOption);

This topic has been moved to the related forum: https://forum.aspose.com/t/did-not-convert-from-memory-stream-to-pdf-if-memory-stream-have-some-graph-chart/255558