RemoveBlankPages
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)
Parameter | Type | Description |
---|---|---|
inputFileName | String | The input file name. |
outputFileName | String | The output file name. |
Return Value
List of page numbers has been considered as blank and removed.
Examples
Shows how to remove empty pages from the document.
// There is a several ways to remove empty pages from the document:
string doc = MyDir + "Blank pages.docx";
Splitter.RemoveBlankPages(doc, ArtifactsDir + "LowCode.RemoveBlankPages.1.docx");
Splitter.RemoveBlankPages(doc, ArtifactsDir + "LowCode.RemoveBlankPages.2.docx", SaveFormat.Docx);
See Also
- class Splitter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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)
Parameter | Type | Description |
---|---|---|
inputFileName | String | The input file name. |
outputFileName | String | The output file name. |
saveFormat | SaveFormat | The save format. |
Return Value
List of page numbers has been considered as blank and removed.
Examples
Shows how to remove empty pages from the document.
// There is a several ways to remove empty pages from the document:
string doc = MyDir + "Blank pages.docx";
Splitter.RemoveBlankPages(doc, ArtifactsDir + "LowCode.RemoveBlankPages.1.docx");
Splitter.RemoveBlankPages(doc, ArtifactsDir + "LowCode.RemoveBlankPages.2.docx", SaveFormat.Docx);
See Also
- enum SaveFormat
- class Splitter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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)
Parameter | Type | Description |
---|---|---|
inputStream | Stream | The input stream. |
outputStream | Stream | The output stream. |
saveFormat | SaveFormat | The save format. |
Return Value
List of page numbers has been considered as blank and removed.
Examples
Shows how to remove empty pages from the document from the stream.
using (FileStream streamIn = new FileStream(MyDir + "Blank pages.docx", FileMode.Open, FileAccess.Read))
{
using (FileStream streamOut = new FileStream(ArtifactsDir + "LowCode.RemoveBlankPagesStream.docx", FileMode.Create, FileAccess.ReadWrite))
Splitter.RemoveBlankPages(streamIn, streamOut, SaveFormat.Docx);
}
See Also
- enum SaveFormat
- class Splitter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words