Dear All,
 
This is my first question in C# Corner. Please apologize for any inconvenience.
 
Iam using WPF and XPS to print content from a FlowDocument.
 
XAML : 
WPF
WPF, which stands for
Windows Presentation Foundation ,
is Microsoft's latest approach to a GUI framework, used with the .NET framework.
Some advantages include:
 
 C# Code to Print :
 
if (File.Exists("printPreview.xps"))
{
File.Delete("printPreview.xps");
}
var xpsDocument = new XpsDocument("printPreview.xps", FileAccess.ReadWrite);
XpsDocumentWriter writer = XpsDocument.CreateXpsDocumentWriter(xpsDocument);
writer.Write(((IDocumentPaginatorSource)FD).DocumentPaginator);
//Document = xpsDocument.GetFixedDocumentSequence();
// Create the print dialog object and set options
PrintDialog pDialog = new PrintDialog();
pDialog.PageRangeSelection = PageRangeSelection.AllPages;
pDialog.UserPageRangeEnabled = true;
// Display the dialog. This returns true if the user presses the Print button.
Nullable print = pDialog.ShowDialog();
if (print == true)
{
FixedDocumentSequence fixedDocSeq = xpsDocument.GetFixedDocumentSequence();
pDialog.PrintDocument(fixedDocSeq.DocumentPaginator, "Test print job");
xpsDocument.Close();
}
 It works fine expect the Final output is by splitting the Page into 2 Columns. Need help in making the page layout in single coulmn.