Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
215
Print Preview different than Printer output
posted

I am setting the LogicalPageLayoutInfo as shown below to FitWidthToPage and it shows correctly in the Preview window but the right side of the physical print out gets cutoff. The HP printer allows the left and right margins to be set to .25".

Am I missing a setting?

		private void dgBallotReceipts_InitializePrintPreview(object sender, CancelablePrintPreviewEventArgs e)
		{
			// Set page margins
			e.PrintDocument.DefaultPageSettings.Margins.Bottom = 50;
			e.PrintDocument.DefaultPageSettings.Margins.Top = 50;
			e.PrintDocument.DefaultPageSettings.Margins.Left = 25;
			e.PrintDocument.DefaultPageSettings.Margins.Right = 25;
 
			// Horizontally fit everything in a single page.
			e.DefaultLogicalPageLayoutInfo.FitWidthToPages = 1;