I use DocumentPaginator to divide FlowDocument's text into pages. Is it possible to get content of each pages by page number after ComputePageCount()? If not, how can I do it in other way?
Code:
var flowDocument = this.Document;
flowDocument.MaxPageHeight = this.MaxContentHeight;
DocumentPaginator paginator = ((IDocumentPaginatorSource)flowDocument).DocumentPaginator;
paginator.ComputePageCount();
You can use the GetPage function of the DocumentPaginator object. Its takes a page number as a parameter.
See http://msdn.microsoft.com/en-us/library/system.windows.documents.documentpaginator.getpage(v=vs.110).aspx
Yes, it is possible.
Here is an example:
MainWindow.xaml
MainWindow.xaml.cs