How to specify the export file fpr PDF reports/exports

Tags: #<Tag:0x00007f70be8ff968> #<Tag:0x00007f70be8ff828>

For this you’ll have to create a new class which extends the default class DifferencesPDFPresenter.
In this class you’ll have to override the method getExportStream().

public class PersonalDifferencesPDFPresenter extends DifferencesPDFPresenter {
     protected OutputStream getExportStream() throws IOException {
         return new FileOutputStream( <export file> );

Now create a pdf comparer and add the custom presenter.

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

View full sourcecode

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