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