Problem with checking for track changes in a document

Hi,
I am facing an issue with checking track changes in a document using Aspose Words for Java. I am using the following piece of code to check for track changes:

Document doc = new Document(filePath);
if (doc.hasRevisions())
{
    // document has track changes
}

For some reason, even if there are no track changes in a document the if condition returns true. This happens in our Production Environment but when we try the same on our local system, we don’t face the issue. The license is loaded properly in Production. Could you please tell what the issue may be.
Thanks,
Reena

Hi
Thanks for your inquiry. Could you please attach sample document for testing. I will try to reproduce the problem on my side and provide you more information.
Also, please make sure you are using the latest version of Aspose.Words. You can download the latest version of Aspose.Words for Java from here:
https://releases.aspose.com/words/net
Best regards.

Hi,
I am attaching a word document that does not contain any track changes but Aspose.Words complains that the document contains track changes.
Regards,
Reena Hegde

Hi

Thanks you for additional information. I use the following code for testing and it returns ‘false’ as expected.

Document doc = new Document("C:\\Temp\\_Rating+Note_Dummy+note.doc");
System.out.println(doc.hasRevisions());

I use the latest version of Aspose.Words for java for testing(3.0.1). you can download this version from here:
https://releases.aspose.com/words/net
Best regards.

Hi,
I downloaded the latest jar file for aspose.words for Java, when using an earlier version I had

doc.save(response.getOutputStream(), SaveFormat.FORMAT_DOCUMENT) in my code but now the new JAR file doesn 't seem to support SaveFormat.FORMAT_DOCUMENT. Can you please tell me what is a suitable substitute for SaveFormat.FORMAT_DOCUMENT in the new JAR file.

Thanks,
Reena

Hi

Thanks for your request. Here is list of available SaveFormats:
https://reference.aspose.com/words/net/aspose.words/saveformat/
I suppose, you can just use SaveFormat.DOC.
Best regards.