Hi All,
We have silver light app which is having a print functionality.
Print functionality is implemented System.Windows.Printing.PrintDocument class provided to implement the printing in silver Light applications.
We are having a around 100 pages that gets printed based on selection. All the xaml pages are derived from Usercontrols having the formatted text content or a png image as the content.
This is a good working code. All of a sudden it's stopped working. It's printing the pages with some blank pages. We are not getting any exception. But when we are trying to print the pages to PDF. We are not getting the save option.
Below are the print settings that we are using.
PrinterFallbackSettings settings = new PrinterFallbackSettings();
settings.ForceVector = true;
settings.OpacityThreshold = 0.5;
pd.Print("My Map");
public void PD_PrintPage(object sender, PrintPageEventArgs e)
{
if (printCount < this.printObjects.Count)
{
if (this.printObjects != null && this.printObjects[printCount].PrintPages.Count > 0)
{
e.PageVisual = (StackPanel)(VisualTreeHelper.GetParent((UserControl)this.printObjects[printCount].PrintPages[0]));
e.HasMorePages = true;
}
else
{
e.HasMorePages = false;
}
}
printCount++;
}
Someone please share your inputs. As we are clueless on where we are going wrong.
Thanks in advance
Pratap G