com.groupdocs.merger.domain.options

Class PreviewOptions

    • Constructor Detail

      • PreviewOptions

        public PreviewOptions(CreatePageStream createPageStream,
                      int previewMode)

        Initializes a new instance of the PreviewOptions class.

        Parameters:
        createPageStream - The method that instantiates stream used to write output page data.
        previewMode - The preview mode of Mode(getMode()/setMode(int))
      • PreviewOptions

        public PreviewOptions(CreatePageStream createPageStream,
                      int previewMode,
                      int[] pageNumbers)

        Initializes a new instance of the PreviewOptions class.

        Parameters:
        createPageStream - The method that instantiates stream used to write output page data.
        previewMode - The preview mode of Mode(getMode()/setMode(int))
        pageNumbers - Page numbers.
      • PreviewOptions

        public PreviewOptions(CreatePageStream createPageStream,
                      int previewMode,
                      int startNumber,
                      int endNumber)
                       throws Exception

        Initializes a new instance of the PreviewOptions class.

        Parameters:
        createPageStream - The method that instantiates stream used to write output page data.
        previewMode - The preview mode of Mode(getMode()/setMode(int))
        startNumber - The start page number.
        endNumber - The end page number.
        Throws:
        Exception
      • PreviewOptions

        public PreviewOptions(CreatePageStream createPageStream,
                      int previewMode,
                      int startNumber,
                      int endNumber,
                      int mode)
                       throws Exception

        Initializes a new instance of the PreviewOptions class.

        Parameters:
        createPageStream - The method that instantiates stream used to write output page data.
        previewMode - The preview mode of Mode(getMode()/setMode(int))
        startNumber - The start page number.
        endNumber - The end page number.
        mode - The range mode.
        Throws:
        Exception
      • PreviewOptions

        public PreviewOptions(CreatePageStream createPageStream,
                      ReleasePageStream releasePageStream,
                      int previewMode)

        Initializes a new instance of the PreviewOptions class.

        Parameters:
        createPageStream - The method that instantiates stream used to write output page data.
        releasePageStream - The method that releases stream created by createPageStream method.
        previewMode - The preview mode of Mode(getMode()/setMode(int))
      • PreviewOptions

        public PreviewOptions(CreatePageStream createPageStream,
                      ReleasePageStream releasePageStream,
                      int previewMode,
                      int[] pageNumbers)

        Initializes a new instance of the PreviewOptions class.

        Parameters:
        createPageStream - The method that instantiates stream used to write output page data.
        releasePageStream - The method that releases stream created by createPageStream method.
        previewMode - The preview mode of Mode(getMode()/setMode(int))
        pageNumbers - Page numbers.
      • PreviewOptions

        public PreviewOptions(CreatePageStream createPageStream,
                      ReleasePageStream releasePageStream,
                      int previewMode,
                      int startNumber,
                      int endNumber)
                       throws Exception

        Initializes a new instance of the PreviewOptions class.

        Parameters:
        createPageStream - The method that instantiates stream used to write output page data.
        releasePageStream - The method that releases stream created by createPageStream method.
        previewMode - The preview mode of Mode(getMode()/setMode(int))
        startNumber - The start page number.
        endNumber - The end page number.
        Throws:
        Exception
      • PreviewOptions

        public PreviewOptions(CreatePageStream createPageStream,
                      ReleasePageStream releasePageStream,
                      int previewMode,
                      int startNumber,
                      int endNumber,
                      int mode)
                       throws Exception

        Initializes a new instance of the PreviewOptions class.

        Parameters:
        createPageStream - The method that instantiates stream used to write output page data.
        releasePageStream - The method that releases stream created by createPageStream method.
        previewMode - The preview mode of Mode(getMode()/setMode(int))
        startNumber - The start page number.
        endNumber - The end page number.
        mode - The range mode.
        Throws:
        Exception
    • Method Detail

      • getPathByPageNumber

        public final String getPathByPageNumber(int pageNumber,
                                 String extension)

        Gets the full file path of previewed document by page number with defined extension.

        Specified by:
        getPathByPageNumber in interface IPreviewOptions
        Parameters:
        pageNumber - Page number of preview.
        extension - Extension of file.
        Returns:
        The full file path.
      • setHeight

        public final void setHeight(int value)

        Preview height.

        Specified by:
        setHeight in interface IPreviewOptions
      • setWidth

        public final void setWidth(int value)

        Preview width.

        Specified by:
        setWidth in interface IPreviewOptions
      • validate

        public final void validate(FileType fileType)

        Validates the preview options.

        Specified by:
        validate in interface IPreviewOptions
        Parameters:
        fileType - The file type.