Guest User

Untitled

a guest
Apr 1st, 2019
15
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.groupdocs.comparison.examples;
  2.  
  3. import com.groupdocs.comparison.Comparer;
  4. import com.groupdocs.comparison.common.compareresult.ICompareResult;
  5. import com.groupdocs.comparison.common.comparisonsettings.ComparisonSettings;
  6.  
  7. public class PdfDocumentsComparision {
  8. // document extension
  9. private static String extension = ".pdf";
  10.  
  11. /* Comparing two pdf documents from files without settings*/
  12.  
  13. public static void ComparePdfFromFileWithoutSettings(String sourceFile, String targetFile) throws Exception {
  14. //ExStart:ComparePdfFromFileWithoutSettings
  15. String sourcePath = Utilities.sourcePath + sourceFile;
  16. String targetPath = Utilities.targetPath + targetFile;
  17. System.out.println(sourcePath);
  18. System.out.println(targetPath);
  19. // Create instance of GroupDocs.Comparison.Comparer and call method
  20. // Compare.
  21. Comparer comparison = new Comparer();
  22. ICompareResult result = comparison.compare(sourcePath, targetPath, new ComparisonSettings());
  23. result.saveDocument(Utilities.outputFileName(".pdf"));
  24. //ExEnd:ComparePdfFromFileWithoutSettings
  25. }
  26. }
RAW Paste Data