It keeps printing portrait

May 19 2008 4:46 PM
I have a really frustrating problem. Although I'm choosing Landscape in the Page Settings, and in the Printer Settings, and in the Preview it shows Landscape, it keeps printing portrait. Actually the page is clipped as like it should be landscape. I have tried everything it seems. I tried to choose another paper tray. But it keeps coming in portrait. What do you think. My code is like this:

                  if (preview) {
                PrintPreviewDialog ppd = new PrintPreviewDialog();
                ppd.Document = doc;
                ppd.ShowDialog();
            }
            else {
                PrintDialog pd = new PrintDialog();
                pd.Document = doc;
                if (pd.ShowDialog() == DialogResult.OK) {
                    prtSettings = pd.PrinterSettings;
                    doc.Print();
                }
            }


I also have a PageSetting field which I'm setting like this:

            PageSetupDialog psd = new PageSetupDialog();
            psd.PageSettings=pgSettings;
            if (psd.ShowDialog() == DialogResult.OK) {
                pgSettings = psd.PageSettings;
            }



What do you think?

Regards
/J Lindroos

Answers (1)