Accept or reject PDF comparison changes in C#

Share on FacebookTweet about this on TwitterShare on LinkedIn

You might be looking for an API that provides ability to apply or discard specific changes between source and target documents and save resultant document with (or without) selected changes.

About the API

GroupDocs.Comparison for .NET is a back-end API that can be integrated in any .NET (existing or new) application without any third party tool/software dependency. Currently API supports all these file formats.

Steps to apply/reject changes

  • Instantiate Comparer object with source document path or stream
  • Call Add method  and specify path target document path or stream
  • Call Compare method
  • Call GetChanges method and obtain detected changes list
  • Set ComparisonActionof needed change object to ComparisonAction.Accept or ComparisonAction.Reject value
  • Call ApplyChanges method and pass collection of changes to it

ApplyChangeOptions Class

Changes – List of changes that must be applied (or not) to the resulting document.

You can see that in “without change.pdffile the text “Powerful document comparison APIs” is not highlighted that means its the rejected one. A complete list of changes is available in ChangeInfo.

Please access API from download section. Feel free to share your concerns on forum.

The post Accept or reject PDF comparison changes in C# appeared first on Document Manipulation APIs Blog – groupdocs.com.