@Test public void compareVisuallyDiffTestTest() throws IOException, InterruptedException { String outPdf = sourceFolder + "compareVisuallyDiffTestTest1.pdf"; String cmpPdf = sourceFolder + "compareVisuallyDiffTestTest2.pdf"; String result = new CompareTool().compareVisually(outPdf, cmpPdf, destinationFolder, "diff_"); System.out.println("\nRESULT:\n" + result); Assert.assertTrue(result.contains("differs on page [1, 2].")); Assert.assertTrue(new File(destinationFolder + "diff_1.png").exists()); Assert.assertTrue(new File(destinationFolder + "diff_2.png").exists()); }
public String compareVisually(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix) throws InterruptedException, IOException { return compareVisually(outPdf, cmpPdf, outPath, differenceImagePrefix, null); }
CompareTool { public String compareVisually(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix) throws InterruptedException, IOException { return compareVisually(outPdf, cmpPdf, outPath, differenceImagePrefix, null); } }
CompareTool { public String compareVisually(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix) throws InterruptedException, IOException { return compareVisually(outPdf, cmpPdf, outPath, differenceImagePrefix, null); } CompareTool();   CompareTool(String gsExec, String compareExec); }
CompareTool { public String compareVisually(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix) throws InterruptedException, IOException { return compareVisually(outPdf, cmpPdf, outPath, differenceImagePrefix, null); } CompareTool();   CompareTool(String gsExec, String compareExec); CompareResult compareByCatalog(PdfDocument outDocument, PdfDocument cmpDocument); CompareTool disableCachedPagesComparison(); CompareTool setCompareByContentErrorsLimit(int compareByContentMaxErrorCount); CompareTool setGenerateCompareByContentXmlReport(boolean generateCompareByContentXmlReport); void setEventCountingMetaInfo(IMetaInfo metaInfo); CompareTool enableEncryptionCompare(); ReaderProperties getOutReaderProperties(); ReaderProperties getCmpReaderProperties(); String compareVisually(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix); String compareVisually(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix, Map<Integer, List<Rectangle>> ignoredAreas); String compareByContent(String outPdf, String cmpPdf, String outPath); String compareByContent(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix); String compareByContent(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix, byte[] outPass, byte[] cmpPass); String compareByContent(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix, Map<Integer, List<Rectangle>> ignoredAreas); String compareByContent(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix, Map<Integer, List<Rectangle>> ignoredAreas, byte[] outPass, byte[] cmpPass); boolean compareDictionaries(PdfDictionary outDict, PdfDictionary cmpDict); CompareResult compareDictionariesStructure(PdfDictionary outDict, PdfDictionary cmpDict); CompareResult compareDictionariesStructure(PdfDictionary outDict, PdfDictionary cmpDict, Set<PdfName> excludedKeys); CompareResult compareStreamsStructure(PdfStream outStream, PdfStream cmpStream); boolean compareStreams(PdfStream outStream, PdfStream cmpStream); boolean compareArrays(PdfArray outArray, PdfArray cmpArray); boolean compareNames(PdfName outName, PdfName cmpName); boolean compareNumbers(PdfNumber outNumber, PdfNumber cmpNumber); boolean compareStrings(PdfString outString, PdfString cmpString); boolean compareBooleans(PdfBoolean outBoolean, PdfBoolean cmpBoolean); String compareXmp(String outPdf, String cmpPdf); String compareXmp(String outPdf, String cmpPdf, boolean ignoreDateAndProducerProperties); boolean compareXmls(byte[] xml1, byte[] xml2); boolean compareXmls(String outXmlFile, String cmpXmlFile); String compareDocumentInfo(String outPdf, String cmpPdf, byte[] outPass, byte[] cmpPass); String compareDocumentInfo(String outPdf, String cmpPdf); String compareLinkAnnotations(String outPdf, String cmpPdf); String compareTagStructures(String outPdf, String cmpPdf); }
CompareTool { public String compareVisually(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix) throws InterruptedException, IOException { return compareVisually(outPdf, cmpPdf, outPath, differenceImagePrefix, null); } CompareTool();   CompareTool(String gsExec, String compareExec); CompareResult compareByCatalog(PdfDocument outDocument, PdfDocument cmpDocument); CompareTool disableCachedPagesComparison(); CompareTool setCompareByContentErrorsLimit(int compareByContentMaxErrorCount); CompareTool setGenerateCompareByContentXmlReport(boolean generateCompareByContentXmlReport); void setEventCountingMetaInfo(IMetaInfo metaInfo); CompareTool enableEncryptionCompare(); ReaderProperties getOutReaderProperties(); ReaderProperties getCmpReaderProperties(); String compareVisually(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix); String compareVisually(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix, Map<Integer, List<Rectangle>> ignoredAreas); String compareByContent(String outPdf, String cmpPdf, String outPath); String compareByContent(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix); String compareByContent(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix, byte[] outPass, byte[] cmpPass); String compareByContent(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix, Map<Integer, List<Rectangle>> ignoredAreas); String compareByContent(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix, Map<Integer, List<Rectangle>> ignoredAreas, byte[] outPass, byte[] cmpPass); boolean compareDictionaries(PdfDictionary outDict, PdfDictionary cmpDict); CompareResult compareDictionariesStructure(PdfDictionary outDict, PdfDictionary cmpDict); CompareResult compareDictionariesStructure(PdfDictionary outDict, PdfDictionary cmpDict, Set<PdfName> excludedKeys); CompareResult compareStreamsStructure(PdfStream outStream, PdfStream cmpStream); boolean compareStreams(PdfStream outStream, PdfStream cmpStream); boolean compareArrays(PdfArray outArray, PdfArray cmpArray); boolean compareNames(PdfName outName, PdfName cmpName); boolean compareNumbers(PdfNumber outNumber, PdfNumber cmpNumber); boolean compareStrings(PdfString outString, PdfString cmpString); boolean compareBooleans(PdfBoolean outBoolean, PdfBoolean cmpBoolean); String compareXmp(String outPdf, String cmpPdf); String compareXmp(String outPdf, String cmpPdf, boolean ignoreDateAndProducerProperties); boolean compareXmls(byte[] xml1, byte[] xml2); boolean compareXmls(String outXmlFile, String cmpXmlFile); String compareDocumentInfo(String outPdf, String cmpPdf, byte[] outPass, byte[] cmpPass); String compareDocumentInfo(String outPdf, String cmpPdf); String compareLinkAnnotations(String outPdf, String cmpPdf); String compareTagStructures(String outPdf, String cmpPdf);  }