We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Printing Problem

Hi again, now i have a little printer problem. I change the page size to "A4". Everything seems fine, but when i´m printing, i get everytimes four pages ... Where ist the fault ? // Setting the page size this.diagram.Model.Width = (int)Measurements.Convert(GraphicsUnit.Millimeter, GraphicsUnit.Pixel, 96.0f, 210f); this.diagram.Model.Height = (int)Measurements.Convert(GraphicsUnit.Millimeter, GraphicsUnit.Pixel, 96.0f, 296f); this.diagram.Model.PageSettings.PaperSize = new PaperSize("A4", (int)this.diagram.Model.Width, (int)this.diagram.Model.Height); Size newsize = new Size((int)this.diagram.Model.Width, (int)this.diagram.Model.Height); // Use Reflection to update the View''''s paper size setting Type viewtype = typeof(Syncfusion.Windows.Forms.Diagram.View); System.Reflection.FieldInfo finfo = viewtype.GetField("pageSize", System.Reflection.BindingFlags.Instance|BindingFlags.NonPublic|BindingFlags.GetField); finfo.SetValue(this.diagram.View, newsize); // Force the view to refresh itself this.diagram.View.Update(true); // Printing routine private void ItemPrint_Click(object sender, System.EventArgs e) { System.Drawing.Printing.PrintDocument printDoc = this.diagram.CreatePrintDocument(); PrintDialog printDlg = new PrintDialog(); printDlg.AllowSelection = true; printDlg.AllowSomePages = true; printDlg.Document = printDoc; if (printDlg.ShowDialog(this) == DialogResult.OK) { printDoc.Print(); } } Any ideas ? cu Kai

1 Reply

AD Administrator Syncfusion Team February 22, 2005 10:05 PM UTC

Hi Kai, Thank you for bringing this issue to our attention. The incorrect page numbering was a result of a small error in the page boundary calculation employed by the Essential Diagram Model and View components. This has been fixed! We are on the verge of shipping a new update of Essential Suite, and the fix will be included in this new release. You can expect the download instructions to be made available in approximately a weeks'' time. Regards, Prakash Surendra Syncfusion, Inc

Live Chat Icon For mobile
Up arrow icon