Printer does not change page orientation.

  • Thread starter Thread starter Francesco2017
  • Start date Start date
F

Francesco2017

Guest
Hi, I have the code below which works OK, except for the paper orientation.

The printer refuses to set to Landscape Mode.

Can you help?

Regards

Francesco C.


private void button2_Click(object sender,EventArgs e)
{
try
{
PrintDialog chart = new PrintDialog();
PrintDocument chart2 = new PrintDocument();
chart2.DefaultPageSettings.Landscape=true;
chart2.DefaultPageSettings.Color=true;
chart2.DocumentName="Chart";
chart.Document=chart2;
chart.AllowSelection=true;
chart.AllowSomePages=false;
chart.AllowCurrentPage=true;
if(chart.ShowDialog()==DialogResult.OK)
chart1.Printing.PrintPreview();
}
catch (Exception ex)
{
MessageBox.Show("Printer is not responding. Please check the printer is online\n NOTE: Sometimes this is due to long delay in response.","Printer Error!",MessageBoxButtons.OK,MessageBoxIcon.Error);
}

}

And this is the Preview from the printer.

1595616.png

Continue reading...
 
Back
Top