Free Support Forum - groupdocs.com

Issue with diff output file


#1

When comparing pdf files, both having some difference in the footer section in page number 2. The diff output file generated by the comparison API shows inserted/deleted items in the header of page number 3, not in page no 2. here i am attaching the snapshots.comparisonfile1_snap.png (20.2 KB)
comparisonfile2_snap.png (19.6 KB)
resultDifference_snap.PNG (91.1 KB)


#2

@sruthy77,

In order to investigate this behavior, we need following details:

  • API platform (.NET or Java)
  • API version that you integrated in the project (e.g. 19.9, 18.10)
  • Sample code
  • Problematic source and target PDF files

#3

Platform: Java
Version: 19.6

Sample Code:

public static void compareFiles(String file1, String file2) throws Exception {
ICompareResult result = null;
try {
License license = new License();
license.setLicense(“C:\Users\ag41365\Desktop\Documents\ProductLicense\GroupDocs.Comparison.lic”);
if (License.isValidLicense()) {
Comparer comparison = new Comparer();
ComparisonSettings settings = new ComparisonSettings();
settings.setDetailLevel(3);
settings.setStyleChangeDetection(false);
settings.setOriginalSize(settings.getOriginalSize());
settings.setShowDeletedContent(true);
settings.setGenerateSummaryPage(true);
settings.setUseFramesForDelInsElements(true);
settings.getInsertedItemsStyle().setFontColor(Color.BLUE);
result = comparison.compare(file1, file2, settings);
}
} catch(com.groupdocs.comparison.internal.c.a.pd.exceptions.IndexOutOfRangeException e) {
e.printStackTrace();
}
finally {
try {
result.saveDocument(“C:\Users\ag41365\Desktop\Documents\Content_Diff.pdf”);
System.out.println(“Files have been successfully compared…”);
} catch(NullPointerException e) {
System.out.println(e.getMessage());
}
}
}

pdf files are attaching here.source files are named as file1 and file2. and target filecomparedFile.pdf (3.5 MB)
file1.pdf (1.3 MB)
file2.pdf (1.5 MB)
is named as comparedfile.


#4

@sruthy77,

This issue is reproduced at our end. Hence, it has been logged in our internal issue tracking system with ID: COMPARISONJAVA-762. We are now investigating it. As there is any update, you’ll be notified.


#5

if you can fix this issue, we would consider buying your product as it solves our current business requirement


#6

@sruthy77,

We are still investigating it. You’ll be notified about the outcomes soon.


#7

@sruthy77,

Can you please look into this resultant.pdf (3.5 MB) file and let us know if this output is satisfying.