Class Splitter
Namespace: Aspose.Words.LowCode
Assembly: Aspose.Words.dll (25.2.0)
Provides methods intended to split the documents into parts using different criteria.
public static class Splitter
Inheritance
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Methods
ExtractPages(string, string, int, int)
Extracts a specified range of pages from a document file and saves the extracted pages to a new file. The output file format is determined by the extension of the output file name.
public static void ExtractPages(string inputFileName, string outputFileName, int startPageIndex, int pageCount)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
startPageIndex
int
The zero-based index of the first page to extract.
pageCount
int
Number of pages to be extracted.
ExtractPages(string, string, SaveFormat, int, int)
Extracts a specified range of pages from a document file and saves the extracted pages to a new file using the specified save format.
public static void ExtractPages(string inputFileName, string outputFileName, SaveFormat saveFormat, int startPageIndex, int pageCount)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveFormat
SaveFormat
The save format.
startPageIndex
int
The zero-based index of the first page to extract.
pageCount
int
Number of pages to be extracted.
ExtractPages(string, string, SaveOptions, int, int)
Extracts a specified range of pages from a document file and saves the extracted pages to a new file using the specified save format.
public static void ExtractPages(string inputFileName, string outputFileName, SaveOptions saveOptions, int startPageIndex, int pageCount)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveOptions
SaveOptions
The save options.
startPageIndex
int
The zero-based index of the first page to extract.
pageCount
int
Number of pages to be extracted.
ExtractPages(Stream, Stream, SaveFormat, int, int)
Extracts a specified range of pages from a document stream and saves the extracted pages to an output stream using the specified save format.
public static void ExtractPages(Stream inputStream, Stream outputStream, SaveFormat saveFormat, int startPageIndex, int pageCount)
Parameters
inputStream
Stream
The input stream.
outputStream
Stream
The output stream.
saveFormat
SaveFormat
The save format.
startPageIndex
int
The zero-based index of the first page to extract.
pageCount
int
Number of pages to be extracted.
ExtractPages(Stream, Stream, SaveOptions, int, int)
Extracts a specified range of pages from a document stream and saves the extracted pages to an output stream using the specified save format.
public static void ExtractPages(Stream inputStream, Stream outputStream, SaveOptions saveOptions, int startPageIndex, int pageCount)
Parameters
inputStream
Stream
The input stream.
outputStream
Stream
The output stream.
saveOptions
SaveOptions
The save options.
startPageIndex
int
The zero-based index of the first page to extract.
pageCount
int
Number of pages to be extracted.
RemoveBlankPages(string, string)
Removes empty pages from the document and saves the output. Returns a list of page numbers that were removed.
public static List<int> RemoveBlankPages(string inputFileName, string outputFileName)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
Returns
List of page numbers has been considered as blank and removed.
RemoveBlankPages(string, string, SaveFormat)
Removes empty pages from the document and saves the output in the specified format. Returns a list of page numbers that were removed.
public static List<int> RemoveBlankPages(string inputFileName, string outputFileName, SaveFormat saveFormat)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveFormat
SaveFormat
The save format.
Returns
List of page numbers has been considered as blank and removed.
RemoveBlankPages(string, string, SaveOptions)
Removes empty pages from the document and saves the output in the specified format. Returns a list of page numbers that were removed.
public static List<int> RemoveBlankPages(string inputFileName, string outputFileName, SaveOptions saveOptions)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name.
saveOptions
SaveOptions
The save options.
Returns
List of page numbers has been considered as blank and removed.
RemoveBlankPages(Stream, Stream, SaveFormat)
Removes blank pages from a document provided in an input stream and saves the updated document to an output stream in the specified save format. Returns a list of page numbers that were removed.
public static List<int> RemoveBlankPages(Stream inputStream, Stream outputStream, SaveFormat saveFormat)
Parameters
inputStream
Stream
The input stream.
outputStream
Stream
The output stream.
saveFormat
SaveFormat
The save format.
Returns
List of page numbers has been considered as blank and removed.
RemoveBlankPages(Stream, Stream, SaveOptions)
Removes blank pages from a document provided in an input stream and saves the updated document to an output stream in the specified save format. Returns a list of page numbers that were removed.
public static List<int> RemoveBlankPages(Stream inputStream, Stream outputStream, SaveOptions saveOptions)
Parameters
inputStream
Stream
The input stream.
outputStream
Stream
The output stream.
saveOptions
SaveOptions
The save options.
Returns
List of page numbers has been considered as blank and removed.
Split(string, string, SplitOptions)
Splits a document into multiple parts based on the specified split options and saves the resulting parts to files. The output file format is determined by the extension of the output file name.
public static void Split(string inputFileName, string outputFileName, SplitOptions options)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name used to generate file name for document parts using rule “outputFile_partIndex.extension”
options
SplitOptions
Document split options.
Split(string, string, SaveFormat, SplitOptions)
Splits a document into multiple parts based on the specified split options and saves the resulting parts to files in the specified save format.
public static void Split(string inputFileName, string outputFileName, SaveFormat saveFormat, SplitOptions options)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name used to generate file name for document parts using rule “outputFile_partIndex.extension”
saveFormat
SaveFormat
The save format.
options
SplitOptions
Document split options.
Split(string, string, SaveOptions, SplitOptions)
Splits a document into multiple parts based on the specified split options and saves the resulting parts to files in the specified save format.
public static void Split(string inputFileName, string outputFileName, SaveOptions saveOptions, SplitOptions options)
Parameters
inputFileName
string
The input file name.
outputFileName
string
The output file name used to generate file name for document parts using rule “outputFile_partIndex.extension”
saveOptions
SaveOptions
The save options.
options
SplitOptions
Document split options.
Split(Stream, SaveFormat, SplitOptions)
Splits a document from an input stream into multiple parts based on the specified split options and returns the resulting parts as an array of streams in the specified save format.
public static Stream[] Split(Stream inputStream, SaveFormat saveFormat, SplitOptions options)
Parameters
inputStream
Stream
The input stream.
saveFormat
SaveFormat
The save format.
options
SplitOptions
Document split options.
Returns
Stream[]
Split(Stream, SaveOptions, SplitOptions)
Splits a document from an input stream into multiple parts based on the specified split options and returns the resulting parts as an array of streams in the specified save format.
public static Stream[] Split(Stream inputStream, SaveOptions saveOptions, SplitOptions options)
Parameters
inputStream
Stream
The input stream.
saveOptions
SaveOptions
The save options.
options
SplitOptions
Document split options.
Returns
Stream[]