How to report to a custom file path

Tags: #<Tag:0x00007f70b546e1f0> #<Tag:0x00007f70b546e128>

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 );

     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

© Copyright 1996 - 2018, i-net software; All Rights Reserved.