The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator 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