com.groupdocs.merger.domain.options

Class PageSplitOptions

  • All Implemented Interfaces:
    IOptions, IPageOptions, com.groupdocs.merger.domain.options.interfaces.IPageSplitOptions, ISplitOptions


    public class PageSplitOptions
    extends PageOptions
    implements com.groupdocs.merger.domain.options.interfaces.IPageSplitOptions

    Provides options for the document page splitting.

    • Constructor Detail

      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream)

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream,
                        int[] pageNumbers)

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
        pageNumbers - Page numbers.
      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream,
                        int startNumber,
                        int endNumber)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
        startNumber - The start page number.
        endNumber - The end page number.
        Throws:
        Exception
      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream,
                        int splitMode,
                        int[] pageNumbers)

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
        splitMode - The splitting mode of Mode(getMode()/setMode(int))
        pageNumbers - Page numbers.
      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream,
                        int splitMode,
                        int startNumber,
                        int endNumber)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
        splitMode - The splitting mode of Mode(getMode()/setMode(int))
        startNumber - The start page number.
        endNumber - The end page number.
        Throws:
        Exception
      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream,
                        int startNumber,
                        int endNumber,
                        Integer mode)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
        startNumber - The start page number.
        endNumber - The end page number.
        mode - The range mode.
        Throws:
        Exception
      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream,
                        int splitMode,
                        int startNumber,
                        int endNumber,
                        int mode)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
        splitMode - The splitting mode of Mode(getMode()/setMode(int))
        startNumber - The start page number.
        endNumber - The end page number.
        mode - The range mode.
        Throws:
        Exception
      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream,
                        ReleaseSplitStream releaseSplitStream)

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
        releaseSplitStream - The method that releases stream created by createPageStream method.
      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream,
                        ReleaseSplitStream releaseSplitStream,
                        int[] pageNumbers)

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
        releaseSplitStream - The method that releases stream created by createPageStream method.
        pageNumbers - Page numbers.
      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream,
                        ReleaseSplitStream releaseSplitStream,
                        int startNumber,
                        int endNumber)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
        releaseSplitStream - The method that releases stream created by createPageStream method.
        startNumber - The start page number.
        endNumber - The end page number.
        Throws:
        Exception
      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream,
                        ReleaseSplitStream releaseSplitStream,
                        int splitMode,
                        int[] pageNumbers)

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
        releaseSplitStream - The method that releases stream created by createPageStream method.
        splitMode - The splitting mode of Mode(getMode()/setMode(int))
        pageNumbers - Page numbers.
      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream,
                        ReleaseSplitStream releaseSplitStream,
                        int splitMode,
                        int startNumber,
                        int endNumber)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
        releaseSplitStream - The method that releases stream created by createPageStream method.
        splitMode - The splitting mode of Mode(getMode()/setMode(int))
        startNumber - The start page number.
        endNumber - The end page number.
        Throws:
        Exception
      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream,
                        ReleaseSplitStream releaseSplitStream,
                        int startNumber,
                        int endNumber,
                        Integer mode)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
        releaseSplitStream - The method that releases stream created by createPageStream method.
        startNumber - The start page number.
        endNumber - The end page number.
        mode - The range mode.
        Throws:
        Exception
      • PageSplitOptions

        public PageSplitOptions(CreateSplitStream createSplitStream,
                        ReleaseSplitStream releaseSplitStream,
                        int splitMode,
                        int startNumber,
                        int endNumber,
                        int mode)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        createSplitStream - The method that instantiates stream used to write output split data.
        releaseSplitStream - The method that releases stream created by createPageStream method.
        splitMode - The splitting mode of Mode(getMode()/setMode(int))
        startNumber - The start page number.
        endNumber - The end page number.
        mode - The range mode.
        Throws:
        Exception
      • PageSplitOptions

        public PageSplitOptions(int splitMode,
                        int[] pageNumbers)

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        splitMode - The splitting mode of Mode(getMode()/setMode(int))
        pageNumbers - Page numbers.
      • PageSplitOptions

        public PageSplitOptions(int splitMode,
                        int startNumber,
                        int endNumber)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        splitMode - The splitting mode of Mode(getMode()/setMode(int))
        startNumber - The start page number.
        endNumber - The end page number.
        Throws:
        Exception
      • PageSplitOptions

        public PageSplitOptions(int splitMode,
                        int startNumber,
                        int endNumber,
                        int mode)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        splitMode - The splitting mode of Mode(getMode()/setMode(int))
        startNumber - The start page number.
        endNumber - The end page number.
        mode - The range mode.
        Throws:
        Exception
      • PageSplitOptions

        public PageSplitOptions(String filePathFormat,
                        int[] pageNumbers)

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        filePathFormat - The file path format e.g. 'c:/split{0}.doc' or 'c:/split{0}.{1}' with already pre-defined extension.
        pageNumbers - Page numbers.
      • PageSplitOptions

        public PageSplitOptions(String filePathFormat,
                        Integer splitMode,
                        int startNumber,
                        int endNumber)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        filePathFormat - The file path format e.g. 'c:/split{0}.doc' or 'c:/split{0}.{1}' with already pre-defined extension.
        splitMode - The splitting mode of Mode(getMode()/setMode(int))
        startNumber - The start page number.
        endNumber - The end page number.
        Throws:
        Exception
      • PageSplitOptions

        public PageSplitOptions(String filePathFormat,
                        Integer splitMode,
                        int startNumber,
                        int endNumber,
                        int mode)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        filePathFormat - The file path format e.g. 'c:/split{0}.doc' or 'c:/split{0}.{1}' with already pre-defined extension.
        splitMode - The splitting mode of Mode(getMode()/setMode(int))
        startNumber - The start page number.
        endNumber - The end page number.
        mode - The range mode.
        Throws:
        Exception
      • PageSplitOptions

        public PageSplitOptions(String filePathFormat,
                        int startNumber,
                        int endNumber)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        filePathFormat - The file path format e.g. 'c:/split{0}.doc' or 'c:/split{0}.{1}' with already pre-defined extension.
        startNumber - The start page number.
        endNumber - The end page number.
        Throws:
        Exception
      • PageSplitOptions

        public PageSplitOptions(String filePathFormat,
                        int splitMode,
                        int[] pageNumbers)

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        filePathFormat - The file path format e.g. 'c:/split{0}.doc' or 'c:/split{0}.{1}' with already pre-defined extension.
        splitMode - The splitting mode of Mode(getMode()/setMode(int))
        pageNumbers - Page numbers.
      • PageSplitOptions

        public PageSplitOptions(String filePathFormat,
                        int startNumber,
                        int endNumber,
                        Integer mode)
                         throws Exception

        Initializes a new instance of the PageSplitOptions class.

        Parameters:
        filePathFormat - The file path format e.g. 'c:/split{0}.doc' or 'c:/split{0}.{1}' with already pre-defined extension.
        startNumber - The start page number.
        endNumber - The end page number.
        mode - The range mode.
        Throws:
        Exception
    • Method Detail

      • getMode

        public final int getMode()

        Gets the mode for page splitting.

        Specified by:
        getMode in interface com.groupdocs.merger.domain.options.interfaces.IPageSplitOptions
      • getPathByIndex

        public final String getPathByIndex(int index,
                            String extension)

        Gets the full file path of splitted document by index with pre-defined extension.

        Specified by:
        getPathByIndex in interface ISplitOptions
        Parameters:
        index - Index of splitted document.
        extension - Extension of file.
        Returns:
        The full file path.
      • validate

        public final void validate(FileType fileType)

        Validates the split options.

        Specified by:
        validate in interface ISplitOptions
        Parameters:
        fileType - The file type of FileType class.