Aspose Document Processing Failed

I’m trying to process the attached document with the following code but I’m receiving error from the Aspose’s end. Could you please help?

try
{
    Aspose.Words.License license = new Aspose.Words.License();

    license.SetLicense("Aspose.Words.lic");

    Document doc = new Document(@"C:\TEMP\test.docx");
    Aspose.Words.Document document = doc;

    string tempDOcxfile = "wordfile.docx";

    document.UnlinkFields();
    document.Range.Fields.Where(f => f.Type == FieldType.FieldNoteRef).ToList().ForEach(f => f.IsLocked = true);

    foreach (Aspose.Words.Section section in document)
    {
        Aspose.Words.HeaderFooter Header;
        Header = section.HeadersFooters[Aspose.Words.HeaderFooterType.HeaderPrimary];
        section.PageSetup.HeaderDistance = 36;
        section.PageSetup.TopMargin = 36;

        section.PageSetup.FooterDistance = 36;
        section.PageSetup.BottomMargin = 36;
    }


    document.UpdatePageLayout();
    document.UpdateFields();
    document.UnlinkFields();

    try
    {

        Aspose.Words.Saving.SaveOutputParameters objSave = document.Save(@"C:\Temp\AsposeLatestout.pdf", SaveFormat.Pdf);
        Aspose.Words.Saving.SaveOutputParameters objSaveWord = document.Save(@"C:\Temp\AsposeLatestout.docx", SaveFormat.Docx);
    }
    catch (Exception ex)
    {

        throw;
    }
}
catch (Exception ex)
{
    throw;
}

test.docx (1.7 MB)

@vasudevan
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-26768

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Also, there is a mistake in your code. You process fields after calling Document.UnlinkFields() method. This method replaces fields with simple text, so after calling this method there are no field in the document anymore.

Hi,

any update on this? or is there any way we can process this document with this code temporarily by making any changes in the document rather than our code?
Thanks,

@vasudevan We have finished an initial analysis of the issue. But unfortunately, it is nit yet scheduled for development. So we cannot provide you any estimates.

The issue occurs because during footnote balancing, all contents are pushed from the page. All main text contents are pushed because of the “Keep with next” rule applicable to the tall table and the previous paragraph (first on the page). So as a workaround you can play with “Keep with next” rule in your document.

Hi, any update on the release of this fix?

@vasudevan The issue is already resolved in the current codebase. The fix will be included into the next 24.6 (June 2024) version of Aspose.Words. It will be released in a couple of days or so. We will be sure to let you know once it is available.

The issues you have found earlier (filed as WORDSNET-26768) have been fixed in this Aspose.Words for .NET 24.6 update also available on NuGet.