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

Free Support Forum - aspose.com

Pdf to Doc Conversion - OutOfMemory Error while saving stream


There is an OutOfMemoryError while saving memory stream to docx format (file having issue is attached).
temp_NTPHousingConstructionJun-JulyTarget_a153fab71a8444f7a5ca92f71c581b0c.pdf (1.6 MB)

We are using Aspose.Pdf ( with the following save options -
AsposePdfdll.DocSaveOptions saveOptions = new AsposePdfdll.DocSaveOptions();
// Set the recognition mode as Flow
saveOptions.Format = AsposePdfdll.DocSaveOptions.DocFormat.DocX;
saveOptions.Mode = AsposePdfdll.DocSaveOptions.RecognitionMode.Flow;
// Set the Horizontal proximity as 2.5
saveOptions.RelativeHorizontalProximity = 2.5f;
saveOptions.ExtractOcrSublayerOnly = true;
// Enable the value to recognize bullets during conversion process
saveOptions.RecognizeBullets = true;

The error is in the following line -
document.Save(memoryStream, saveOptions);

Same issue is occurring with Aspose to Pdf Web tool while converting this file from pdf to doc. Please provide some solution as it’s coming more frequently on production.

Let me know if you need more information.

Sumit Awasthi


We have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as PDFNET-51408. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.