Hello all,
We have run into a fatal stackoverlow issue when rendering a doc file to PDF.
We have run the code using the latest Aspose.Words version (24.10.0)
It seems to be related to the formatting of a mergefield, which is set to “Current date”.
In attachment I have included the source DOC and the Exception trace.
Would it be possible to have a look into this issue?
Thank you
StrackOverflow_Words_24.10.0.zip (39.8 KB)
Aspose.Words.Document? doc = new(path);
try
{
Aspose.Words.Saving.PdfSaveOptions saveOptions = new Aspose.Words.Saving.PdfSaveOptions { OptimizeOutput = true, MemoryOptimization = true, ImageCompression = Aspose.Words.Saving.PdfImageCompression.Auto, JpegQuality = 75, DownsampleOptions = downSampleOptions };
saveOptions.UpdateFields = false; //When setting this property to "true" it goes into stackoverflow
using (MemoryStream outputStream = new MemoryStream())
{
doc.Save(outputStream, saveOptions);
pdf = outputStream.ToArray();
}
}
finally
{
// Explicitly set the document to null to help with garbage collection
doc = null;
}