com.groupdocs.merger.domain.options

Class PreviewOptions

    • Constructor Detail

      • PreviewOptions

        public PreviewOptions(PageStreamFactory pageStreamFactory,
                              int previewMode)

        Initializes a new instance of the PreviewOptions class.

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

        public PreviewOptions(PageStreamFactory pageStreamFactory,
                              int previewMode,
                              int[] pageNumbers)

        Initializes a new instance of the PreviewOptions class.

        Parameters:
        pageStreamFactory - 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(PageStreamFactory pageStreamFactory,
                              int previewMode,
                              int startNumber,
                              int endNumber)
                       throws Exception

        Initializes a new instance of the PreviewOptions class.

        Parameters:
        pageStreamFactory - 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(PageStreamFactory pageStreamFactory,
                              int previewMode,
                              int startNumber,
                              int endNumber,
                              int mode)
                       throws Exception

        Initializes a new instance of the PreviewOptions class.

        Parameters:
        pageStreamFactory - 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
    • 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