Exception while extracting pages from docx file

Hi,
I am trying to extract pages from docx but it is throwing an exception - “Index was outside the bounds of the array.”

    string inputFilePath = @"C:\Manuscript_FMFCopy.docx";
    Aspose.Words.Document doc = new Aspose.Words.Document(inputFilePath);

    if (doc.PageCount > 0)
    {
      doc = doc.ExtractPages(0, 1);
      doc.Save(@"C:\Output.docx");
    }

Thanks,

File.zip (75.6 KB)

@amolm, thank you for reporting this issue. 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-25780

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.

@denis.shvydkiy Any updates on this?

@amolm The issue is already resolved in the current codebase. The fix will be included into the next 23.9 version of Aspose.Words. We will be sure to let you know once it is released.

Thank you @alexey.noskov

1 Like

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