An unhandled exception of type �System.StackOverflowException� occurred in Aspose.Pdf.DLL

Hello,

I've been using the Aspose Words and PDF components in a website for some time now. I have recently started receiving reports that certain .doc files, when opened in Aspose.Words and prepared for processing by Aspose.PDF are causing Aspose.PDF to fault with a stack overflow.

I have attached a file which is causing this fault. Here is the code segment in question:

//
// Still here? File named in sTemp looks good. Let's see if we can get ASPOSE to
// convert it for us.
//
try
{
//
// Open the input Word document
//
Aspose.Words.Document doc = new Aspose.Words.Document (sTemp);
//
// Save the document in the Aspose.Pdf.Xml format.
//
String sXMLName = Path.ChangeExtension (sTemp, ".xml");
doc.Save (sXMLName, Aspose.Words.SaveFormat.AsposePdf);
//
// Read the document into Aspose.Pdf.
//
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf ();
pdf.BindXML (sXMLName, null);
//
// Instruct it to delete temporary image files.
//
pdf.IsImagesInXmlDeleteNeeded = true;
//
// This is optional, but can speed up Aspose.Pdf if you convert multiple files in one session.
//
pdf.IsTruetypeFontMapCached = false;
pdf.TruetypeFontMapPath = Path.GetTempPath ();
//
// Produce the PDF file.
//
pdf.Save (sFileName);
//
// Delete the XML
//
File.Delete (sXMLName);
//
// Delete the original file
//
File.Delete (sTemp);
}
catch (Exception ex)
{
SetErrorMessage (msgCodes.errASPOSE, ex.Message);
return;
}

the pdf.Save call never returns, instead resulting in an unhandled stack overflow in the DLL.

The Aspose.Words DLL has a file version of 5.2.2.0 and a product version of 200.8.13.0, date modified, 14.08.200 05:26

the Aspose.PDF DLL has a file version of 4.1.0.0 and a product version of 2009.8.20.0, date modified, 20.08.2009 17:04.

There are other files which are processed normally, so I don't believe that it's a general configuration problem.

All assistance welcome!

David

Hello.
Thank you for your inquiry.
You are using a very old version of Aspose.Words. In the new version to save the document to pdf you do not need to translate content into an intermediate format.
The latest version of our product you can download here: http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

And please read this article here, which tells how to save the document to pdf: http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/howto-convert-a-document-to-pdf.html