• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

Is there any Java API available to compare two microsoft word documents?

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am looking for a Java API which can compare two microsoft word documents.

We are using Linux server so we can't install Microsoft Word in it.

We want to compare two document and what ever things are not common that we have to highlight with some color or any other way ... So I thing we have to merge both document and highlight content which are not common.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
// Create instance of GroupDocs.Comparison.Comparer and call method
Comparer comparison = new Comparer();
ICompareResult result = comparison.compare("D://source.pdf", "D://target.pdf", new ComparisonSettings());
result.saveDocument(Utilities.outputFileName(".pdf"));


refer : GroupDocs : - https://products.groupdocs.com/comparison/java
 
Bartender
Posts: 29139
215
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bihag Raval wrote:
We are using Linux server so we can't install Microsoft Word in it.



No, but LibreOffice can import documents in Microsoft Word and .docx formats.
 
Tim Holloway
Bartender
Posts: 29139
215
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:

Bihag Raval wrote:
We are using Linux server so we can't install Microsoft Word in it.



No, but LibreOffice can import documents in Microsoft Word and .docx formats.



Well, actually, you could install Wine and you should be able to run Word under Wine, subject to Microsoft licensing restrictions. But unless you need eactly what MS-Word would give you, using LibreOffice would be much simpler.
 
Bartender
Posts: 15743
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aspose Words has a very rich API for all kinds of Word document manipulations. It's not free, but it's very powerful.
 
Bartender
Posts: 7645
178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apache POI has also made great strides in its docx handling, and it is free. Of course, this post is more than a decade old, so the point is highly likely to be moot.
 
Tim Holloway
Bartender
Posts: 29139
215
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have we just been Astroturfed?
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try Spire.Doc for Java. Here is the sample code snippet for your reference.
 
reply
    Bookmark Topic Watch Topic
  • New Topic