Page Setting

Hi,

I want to set page settings by overriding PrintDocument , but it appears not to work. the code as fllow:
public class GYPrintGoView : GoView
{
public override void PrintDocumentPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.PageSettings.Landscape = true;
base.PrintDocumentPage(sender, e);
}
} private void Form2_Load(object sender, EventArgs e)
{
GYPrintGoView view = new GYPrintGoView();
view.Visible = true;
view.Dock = DockStyle.Fill;
view.SheetStyle = GoViewSheetStyle.Sheet;
view.Document.Add(new GoTextNode());
view.PrintPreview();
}
what can i do? i am waiting on line.

If you want to set landscape, you can do that with this (as documented in the API reference under PrintShowDialog)

protected override DialogResult PrintShowDialog(PrintDocument pd) {
pd.DefaultPageSettings.Landscape = true;
pd.DefaultPageSettings.Margins = new Margins(0, 0, 0, 0);
return base.PrintShowDialog(pd);
}

Thanks!