StiPrintProvider_QueryPageSettings
Posted: Wed Feb 21, 2007 9:18 am
I use the new event QueryPageSetting event like this:
private void StiPrintProvider_QueryPageSettings(object sender, StiQueryPageSettingsEventArgs e)
{
if (this.Höhe.HasValue && this.Breite.HasValue)
{
int Height = (int)(this.Höhe.Value / 0.254);
int Width = (int)(this.Breite.Value / 0.254);
PaperSize MyPaperSize = new PaperSize("WGPNextGen", Width, Height);
e.PaperSize = MyPaperSize;
}
else
e.PaperSize = null;
}
When setting the size I get this message:
"PaperSize cannot be changed unless the Kind property is set to custom"
The question is where do I set the kind property?
Thanks a lot!
private void StiPrintProvider_QueryPageSettings(object sender, StiQueryPageSettingsEventArgs e)
{
if (this.Höhe.HasValue && this.Breite.HasValue)
{
int Height = (int)(this.Höhe.Value / 0.254);
int Width = (int)(this.Breite.Value / 0.254);
PaperSize MyPaperSize = new PaperSize("WGPNextGen", Width, Height);
e.PaperSize = MyPaperSize;
}
else
e.PaperSize = null;
}
When setting the size I get this message:
"PaperSize cannot be changed unless the Kind property is set to custom"
The question is where do I set the kind property?
Thanks a lot!