Our conversion process does some pre-processing of word documents prior to conversion to PDF. One thing we do is remove optional hyphen characters:
private Boolean RemoveOptionalHyphens(Document doc)
{
int numReplaced = doc.Range.Replace(ControlChar.OptionalHyphenChar.ToString(), "", false, false);
doc.UpdatePageLayout()
return numReplaced> 0;
}
This generally works fine however we see some documents come through the system which result in a runaway process upon calling doc.UpdatePageLayout(). The call never returns and the CPU is pegged at 100% until the process is manually killed. I have attached an example document which reproduces this behavior reliably. We are using the latest Aspose.Words.NET 10.4
Please advise if there is any workaround or if this is a bug you can address. I can possibly provide additional documents which exhibit this behavior if you need.