Method PageNumbers
PageNumbers(LayoutDocument)
A lookup of the page number a position is laid out on: the PageNumberText of the page holding the text at the position (the text before it at a run's end), else of the paragraph's nearest text; null for a position whose paragraph the layout drew no text of. A layout without source references answers null for every position.
public static Func<DocumentPosition, string?> PageNumbers(LayoutDocument layout)
Parameters
layoutLayoutDocumentThe layout of the document the positions are in.
Returns
- Func<DocumentPosition, string>
The lookup; it reads the layout as it is when called, once, and holds what it read.
Exceptions
- ArgumentNullException
layoutis null.