PrintDialog printDlg = new PrintDialog() The code is: private void mnuPrint_Click(object sender, RoutedEventArgs e) In both cases, Size is correctly set to A4 dimensions. Using Adobe PDF Writer, the page size is set to A4 correctly, but the datagrid is similarly truncated, cutting off a number of rows of the datagrid. However, with Microsoft Print to PDF (Windows 10), the page size is not inherited from PrintDialog correctly, and the page is not A4 (see illustration below). The PrintVisual command works fine with a printer and everything prints correctly. Loop to iterate through the data to print separate pages using PrintVisual. The datagrid often contains more rows than can fit onto a single page and I am using a for
I have a C# WPF grid (grdPrintingGrid in the code below) containing a number of text boxes, labels and a datagrid (dgdIncomeTransactions in the code below).