Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Created October 23, 2019 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/3855a6c7c8b983c47c12ad5e24d7068c to your computer and use it in GitHub Desktop.
Save GroupDocsGists/3855a6c7c8b983c47c12ad5e24d7068c to your computer and use it in GitHub Desktop.
Comparer comparer = new Comparer();
// Settings
ComparisonSettings comparisonSettings = new ComparisonSettings();
comparisonSettings.setCalculateComponentCoordinates(true);
// Compare documents
ICompareResult compareResult = comparer.compare(sourcePath, targetName, comparisonSettings);
// Getting sizes of the first change
ChangeInfo[] changes = compareResult.getChanges();
// Coordinates of first change
final Rectangle rectangle = changes[0].getBox();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment