Replies: 1   Views: 131
Can you compare word/pdf files and get a comparison file?
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by daveiroquois  · 20-04-2022 - 15:14

Does your product provide a function in which 2 Word and/or PDF documents can be compared and the differences would be highlighted in a third document generated by the function? Thanks!

Posted by admin  · 20-04-2022 - 15:52


The stable release of phpdocx doesn't include a method to compare two documents and generate a new document with the differences highlighted.

This task could be done with DOCX documents using DOCXPath methods ( and DOCXCustomizer (, but it requires iterating and comparing XML contents. There's no direct function to accomplish it in the stable release of phpdocx.