Closed ghost closed 6 years ago
I tried to reproduce your issue with this snippet:
public static void main(String[] args) throws Exception {
String requirement = "D:\\PDFComparisonPDFs\\doc1.pdf";
String actual = "D:\\PDFComparisonPDFs\\doc2.pdf";
createDummyFile(requirement);
createDummyFile(actual);
new PdfComparator(requirement, actual).compare();
System.out.println("Completed");
}
private static void createDummyFile(String pathname) throws Exception {
new File(pathname).getParentFile().mkdirs();
try (FileOutputStream outputStream = new FileOutputStream(pathname)) {
outputStream.write("Hello World".getBytes());
}
}
This doesn't log "No files found to compare". (Instead it throws an Exception because my files are no pdf files obviously.) So I'm inclined to say that your specified file are really not there.
From the information given, it's now possible to help you. It is most likely, that you have some typo or similar in your path/filenames. I'm very positive, the functionality works. There is also an integration test for that, which works.
I close this, since I have no idea, how we could help. If your problem persists, please reopen the issue with your explanaition.
@rweisleder I am getting this same very issue. When I compare the code you tried to reproduce the issue from the one who reported, you are not using the method writeTo(). When we invoke this method, I am getting the same error. Can you kindly reopen this issue please and provide a fix?
Hi,
I'm getting the following message "WARN de.redsix.pdfcompare.PdfComparator - No files found to compare" even the PDF files were present in the path specified.
*Following is my piece of code to compare two sample PDF's:
package PDFcomparison;
import de.redsix.pdfcompare.PdfComparator;
public class pdfcomparisontest {
}
Following is the dependencies added to POM.xml