title: WPF Print Problem
body: <p>When i select Microsoft XPS Document Writer as Printer, my output is perfect but when i select my HP 1020 printer machine, the printer outputs blank copy...Following is the code....</p>
  
  <pre><code>private void printButton_Click(object sender, RoutedEventArgs e)
      {
          PrintInvoice pi = new PrintInvoice();
          pi.DataContext = this.DataContext;
          PrintDialog printDlg = new System.Windows.Controls.PrintDialog();
          if (printDlg.ShowDialog() == true)
          {
              pi.Margin = new Thickness(30);
  
              //now print the visual to printer to fit on the one page.
              printDlg.PrintVisual(pi, "First Fit to Page WPF Print");
          }
      }
  </code></pre>