Spell check disabled after document save

Hi,

We have an issue with .docx files consistently not spell-checking after being downloaded from our system. I have tested this fairly thoroughly and can safely say the following:

  • I can successfully load a simple byte array of document data and when downloading, the misspelled words are underlined red as expected
  • If, prior to download, I write the data to a memory stream and create an Aspose document from that, then save the document to file, the resulting document has no underlined words and when running a spellcheck manually under the “review” tab in Word, it says the check is complete and I’m “good to go”.
  • When I highlight a paragraph with misspellings and go to “review” to check the language settings, the checkbox to disable spell check is not checked, meaning it should be checking as far as I can see, nor is the document-level setting under file - options - proofing.

For clarification, this code works:

byte[] data = GetDocumentData();
File.WriteAllBytes(@"C:\test2.docx", data);

This does not:

byte[] data = GetDocumentData();
using (MemoryStream MemStream = new MemoryStream())
{
    MemStream.Write(data, 0, data.Length);
    Document WordDoc = new Document(MemStream);
    string TempFile = @"C:\test.docx";
    WordDoc.Save(TempFile, SaveFormat.Docx);
}

In the example above, test.docx will not spell check without being re-forced and test2.docx will spell check just fine. My question is whether or not I may be doing anything incorrectly, or if this is something Aspose does intentionally?

Thanks for any help you can provide.

Steve

This is the same user (SyseroSteve) posting from our licence holding account.

I have tested this further and before I continue I should point out that GetDocumentData() in my original examples is simply performing a File.ReadAllBytes(). I am also using version 16.5.

In addition to the issue above I have also noticed that the file size has been altered. My original document is 12KB and the resulting documents are 12KB and 9KB. The document with the spell checking absent is only 9KB so I assume this is related. I have attached an image to illustrate this (“Spelling.docx” is the original and the other docs are as mentioned in my initial post).

Hi Steve,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document
  • Aspose.Words generated output document showing the undesired behavior
  • Your expected document which shows the correct output. Please create this document using Microsoft Word application.
  • Please create a standalone console application (source code without compilation errors) that helps us reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we’ll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click ‘Reply’ button that will bring you to the ‘reply page’ and there at the bottom you can include any attachments with that post by clicking the ‘Add/Update’ button.

Best regards,

I have attached a zip of a console app that reproduces the issue. The 3 documents are in the folder bin/Debug/Docs which is where the project loads them from.

The original document is named “Original.docx”, with resulting documents named “Broken.docx” and “Working.docx”.

Thanks for your help.

Hi Steve,

Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 16.5.0, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-13875. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

A post was split to a new topic: Aspose.Words disables Spell Check

The issues you have found earlier (filed as WORDSNET-13875) have been fixed in this Aspose.Words for .NET 20.11 update and this Aspose.Words for Java 20.11 update.