Background
I am having a bit of trouble printing with WPF. Let's say that I have a flow-control document that looks as follows.
My first page looks like this:
-- Page 1 --
1
2
3
4
5
My second page looks something like this:
-- Page 2 --
6
7
8
9
10
So, to make this more clear, here is what the contents of my flow-document actually look like:
-- Page 1 --
1
2
3
4
5
-- Page 2 --
6
7
8
9
10
Well, when I go and print. This is what the output looks like (on the 8.5x11 paper), or in other words I will get all of the following, being printed on a single page from left to right. The output is doing it like a newspaper when in fact all of my document items are just runs are simply sequential. So like... all of the following will appear on a single page.
-- Page 1 -- -- Page 2 --
1 6
2 7
3 8
4 9
5 10
Here is my source code for printing:
private void button_Print_Click(object sender, RoutedEventArgs e)
{
IDocumentPaginatorSource s = null;
FlowDocument fd = null;
PrintDialog p = new PrintDialog();
// specify the document
fd = this.richTextBox_Contents.Document;
s = fd;
// print the document
if (p.ShowDialog().Value == true)
{
p.PrintDocument(s.DocumentPaginator, "Contents");
}
}
Question
So is there any way to stop this document from returning to new columns as it's being printed? And just print everything straight from top to bottom?