How to report to a custom file path

See the CompareAndExportToSpecificFilename sample for an additional sample along these lines.

For this create a new class with extending the default class ReportPDFPresenter.
In this class should now the getExportStream() overrided.

the last constructor parameter isn’t needed, if the getExportStream() overrided

public class PersonalReportPDFPresenter extends ReportPDFPresenter{

    public PersonalReportPDFPresenter( boolean detailed, boolean appendSettings) {
        super( detailed, appendSettings, null );
    }

     @Override
     protected OutputStream getExportStream() throws IOException {
         return new FileOutputStream( <export file> );
     }
}

After them use the pdf comparer and add the personal presenter.

new PDFComparer() .addPresenter( personalReportPDFPresenter) .compare( <file1>, <file2> );

View full sourcecode