Class ExportFilePresenter

    • Constructor Detail

      • ExportFilePresenter

        public ExportFilePresenter()
    • Method Detail

      • applyPrintRange

        protected void applyPrintRange​(ExportFilePresenter.HasPrintRange printToX)
        Set the print range to the Print-implementation.
        Parameters:
        printToX - the print implementation
        Since:
        i-net PDFC 3.0
      • setPrintRange

        public void setPrintRange​(int from,
                                  int to)
        Set the range of pages to render into the export-document.
        If both parameters are -1, all pages will be printed. This is the default setting.
        Parameters:
        from - the first page to include, 0-based.
        to - the last page to include, must be greater or equal to from and smaller than the total number of pages available
        Since:
        i-net PDFC 3.0
      • configure

        public BasePresenter configure​(IProfile configuration)
        Sets a boolean flag indicating whether an export will be generated when there are no differences found in the compared PDFs.

        Default value is false.

        differences found in the compared PDFs, if set to false an export will always be generated even when there are no differences. Configures the presenter according to a configuration. The presenter will read the property PDFCProperty.MAX_ERRORS_PER_FILE from the configuration.
        Overrides:
        configure in class BasePresenter
        Parameters:
        configuration - the configuration to read from, must not be null
        Returns:
        this instance for concatenation
      • getExportStream

        protected java.io.OutputStream getExportStream()
                                                throws java.io.IOException
        Opens an returns an output stream for the result of the current BasePresenter.getModel(). The caller of this method will close the stream itself!
        Returns:
        the stream to write the current result to
        Throws:
        java.io.IOException - thrown in case the stream could not be created
        Since:
        i-net PDFC 3.0
      • getExtension

        protected abstract java.lang.String getExtension()
        Get the extension of the target file
        Returns:
        the file extension like .pdf or .png
        Since:
        i-net PDFC 4.3
      • setExportOnlyOnDifferences

        @Deprecated
        public void setExportOnlyOnDifferences​(boolean exportOnlyOnDifferences)
        Deprecated.
        As of i-net PDFC 4.3, use PDFComparer.setSettings(Settings)
        Sets a boolean flag indicating whether an export will be generated when there are no differences found in the compared PDFs.

        Default value is false.

        Parameters:
        exportOnlyOnDifferences - if set to true an export will only be generated when there are differences found in the compared PDFs, if set to false an export will always be generated even when there are no differences.
        Since:
        i-net PDFC 4.0
      • setModel

        public void setModel​(ResultModel newModel)
        Registers this presenter to a model. If it already was registered to a model, the old model will be detached first.
        Overrides:
        setModel in class BasePresenter
        Parameters:
        newModel - the new