How to print the comparing result

At first your should set up a printer service

PrintService printService = PrintServiceLookup.lookupDefaultPrintService();

and then use a print presenter for the comparison

 new PDFComparer()
            .addPresenter( new DifferencesPrintPresenter( printService, new HashPrintRequestAttributeSet()) )
            .compare( <file1>, <file2> );

This setting will use the default printer, if any. To define the printer to be used, the attribute set has to be filled.

View full sourcecode