AD
Administrator
Syncfusion Team
December 7, 2005 11:33 PM UTC
Hello Ratan,
This is the expected behavior of the .NET Printing infrastructure. You can change the paper size attributes (width/height/papername) only if the PaperSize is a custom type that you created. To specify any of the standard PaperSizes, you will have to get the supported sizes from the PrinterSetting''s PaperSizes collection, and choose the appropriate one. The following code should give you an idea on how to go about this issue,
PageSettings pagesetting = new PageSettings();
if(pagesetting.PrinterSettings.IsValid)
{
PaperSize selectedsize = null;
for (int i = 0; i < pagesetting.PrinterSettings.PaperSizes.Count; i++)
{
PaperSize currentsize = pagesetting.PrinterSettings.PaperSizes[i];
if(currentsize.PaperName == "A6")
{
selectedsize = currentsize;
break;
}
}
if(selectedsize != null)
{
pagesetting.Landscape = true;
activeDiagram.View.PageSettings = pagesetting;
activeDiagram.View.RefreshPageSettings();
activeDiagram.View.Update(true);
}
}
This is purely a .NET issue, and you should be able to get more detailed information by referring to the MSDN documentation on the relevant classes.
Thanks,
Prakash Surendra
Syncfusion Inc.,