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

Free Support Forum - aspose.com

BUG: System.IO.EndOfStreamException when converting PDF to DOC


I am trying to convert to DOC the attached PDF and Aspose.Pdf.Document.Save throws System.IO.EndOfStreamException.
I am using Aspose.PDF 11.2 trial version.

Stream PdfToWordAspose(Stream pdf)
//load the PDF
Aspose.Pdf.Document pdfDoc = new Aspose.Pdf.Document(pdf);

MemoryStream docStream = new MemoryStream();
Aspose.Pdf.DocSaveOptions saveOptions = new Aspose.Pdf.DocSaveOptions();
saveOptions.Format = Aspose.Pdf.DocSaveOptions.DocFormat.Doc;
saveOptions.Mode = Aspose.Pdf.DocSaveOptions.RecognitionMode.Flow;
saveOptions.RecognizeBullets = true;

pdfDoc.Save(docStream, saveOptions);
docStream.Position = 0;

return docStream;


Hi Luis,

Thanks for contacting support.

I have tested the scenario using Aspose.Pdf for .NET 11.2.0 and have managed to notice OutOfMemoryException during conversion. For the sake of correction, I have logged this problem as PDFNEWNET-40166 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.