Free Support Forum - aspose.com

Including document protection in document comparison

Hi,

is it planned to include document protection in document comparison?

Example:
I have two documents with same content. Both document are protected. The areas released for editing differ in both documents. It would be nice if these different areas were marked.

The Word compare function also finds no differences.

If you need further information, just ask.

Kind regards
Ingo Gutzeit

@gutzeit,

Thanks for your inquiry. Please ZIP and attach your input Word documents here for testing. We will investigate the issue on our side and provide you more information.

@tahir.manzoor

thank you very much for the prompt feedback.

Here is the sample code and the document are attached (protection.zip (25.2 KB)):

Document protected1 = new Document("<path to>\\protected1.docx");
Document protected2 = new Document("<path to>\\protected2.docx");

protected1.compare(protected2, "user", new Date());

if (!protected1.hasRevisions()) {
      // no revisions found
} 

protection.png (4.0 KB)

Kind regards
Ingo Gutzeit

@gutzeit,

Thanks for sharing the detail. Please note that Aspose.Words mimics the behavior of MS Word. MS Word does not allow to compare protected documents.

@tahir.manzoor

Thank you for the prompt feedback.

Kind regards
Ingo Gutzeit