C# Class Aspose.Words.Examples.CSharp.Loading_Saving.PageNumberFinder

Provides methods for extracting nodes of a document which are rendered on a specified pages.
Show file Open project: aspose-words/Aspose.Words-for-.NET Class Usage Examples

Public Methods

Method Description
GetPage ( Node node ) : int

Retrieves 1-based index of a page that the node begins on.

GetPageEnd ( Node node ) : int

Retrieves 1-based index of a page that the node ends on.

PageNumberFinder ( LayoutCollector collector ) : System

Initializes new instance of this class.

PageSpan ( Node node ) : int

Returns how many pages the specified node spans over. Returns 1 if the node is contained within one page.

RetrieveAllNodesOnPages ( int startPage, int endPage, NodeType nodeType ) : ArrayList

Returns a list of nodes that are contained anywhere on the specified page or pages which match the specified node type.

SplitNodesAcrossPages ( ) : void

Splits nodes which appear over two or more pages into separate nodes so that they still appear in the same way But no longer appear across a page.

Private Methods

Method Description
AddPageNumbersForNode ( Node node, int startPage, int endPage ) : void

This is called by SectionSplitter to update page numbers of split nodes.

CheckPageListsPopulated ( ) : void
IsHeaderFooterType ( Node node ) : bool

Method Details

GetPage() public method

Retrieves 1-based index of a page that the node begins on.
public GetPage ( Node node ) : int
node Node
return int

GetPageEnd() public method

Retrieves 1-based index of a page that the node ends on.
public GetPageEnd ( Node node ) : int
node Node
return int

PageNumberFinder() public method

Initializes new instance of this class.
public PageNumberFinder ( LayoutCollector collector ) : System
collector LayoutCollector A collector instance which has layout model records for the document.
return System

PageSpan() public method

Returns how many pages the specified node spans over. Returns 1 if the node is contained within one page.
public PageSpan ( Node node ) : int
node Node
return int

RetrieveAllNodesOnPages() public method

Returns a list of nodes that are contained anywhere on the specified page or pages which match the specified node type.
public RetrieveAllNodesOnPages ( int startPage, int endPage, NodeType nodeType ) : ArrayList
startPage int
endPage int
nodeType NodeType
return System.Collections.ArrayList

SplitNodesAcrossPages() public method

Splits nodes which appear over two or more pages into separate nodes so that they still appear in the same way But no longer appear across a page.
public SplitNodesAcrossPages ( ) : void
return void