updatePageLayout() Never Returns

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.

I’ve also discovered that unsurprisingly the same behavior occurs when calling doc.Save() using PDF as the output format.

Hello
Thank you for reporting this problem to us and for the additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.
Best regards,

The issues you have found earlier (filed as WORDSNET-5278) have been fixed in this .NET update and in this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.