public void compare() {
    	
    	// could not find the new generated pdf document
    	if(pdfInfoHolder.getDifferent() == DifferenceType.MISSINGDOCUMENT)
    	{
    		missingDocument(pdfInfoHolder.getPDF1());
    		return;
    	}
    	
        PDFFile pdf1 = pdfInfoHolder.getPDF1();
        PDFFile pdf2 = pdfInfoHolder.getPDF2();

        // find all differences on all pages
        for (int i = 1; i <= pdf1.getNumPages(); i++) {
        	// get the current page
            PDFPage pagePDF1 = pdf1.getPage(i);
            PDFPage pagePDF2 = pdf2.getPage(i);

            // missing a page
            if(pagePDF2 == null)
            {
            	missingPage(pagePDF1, i);
            	continue;
            }
            
            // find real visual differences
            findVisualDifferences(i, pagePDF1, pagePDF2, targetFolder);
        }

        // if there is a difference on one of the 
        // pages mark the entire pdf as different
        pdfInfoHolder.checkDifference();
    }