I am trying to print a flowdocument with the number of the corresponding page on each page.
What is the best way to do this? Directly on the flowdocument or on the PrintDialog?
I've been searching for this but without success.
Thanks in advance.
private void Btn_print_Click(object sender, RoutedEventArgs e)
{
PrintDialog pd = new PrintDialog();
if (pd.ShowDialog() == true)
{
IDocumentPaginatorSource idp = FlowDoc;
pd.PrintDocument(idp.DocumentPaginator, "Flow Document");
}
}
The code includes comments to explain each step of the process