I am trying to get a long description to fit into my printPreviewDialog Document. However, when I type the description in my text box and try to print it the text does not stay on the document. Text not staying on document The line of code that is causing this issue is the last one
e.Graphics.DrawString("Description:" + description4Repair.Text, new Font("Arial", 15, FontStyle.Regular), Brushes.Black, new Point(50, 493));
All code:
e.Graphics.DrawString("DEVICE INFORMATION:", new Font("Arial", 14, FontStyle.Regular), Brushes.Black, new Point(286, 373));
e.Graphics.DrawString("Device Type:" + devices.Text, new Font("Arial", 15, FontStyle.Regular), Brushes.Black, new Point(50, 403));
if (devices.Visible == true & devices.Text == "Console")
{
e.Graphics.DrawString("Type of Console:" + consoleTextBox.Text, new Font("Arial", 15, FontStyle.Regular), Brushes.Black, new Point(50, 433));
}
if (comboBox3.Visible == true) //iphone selection box is visible then show selected model on print document
{
e.Graphics.DrawString("Type of Phone:" + comboBox3.Text, new Font("Arial", 15, FontStyle.Regular), Brushes.Black, new Point(50, 433));
e.Graphics.DrawString("Service Type:" + serviceDesc.Text, new Font("Arial", 15, FontStyle.Regular), Brushes.Black, new Point(50, 463));
e.Graphics.DrawString("Description:" + description4Repair.Text, new Font("Arial", 15, FontStyle.Regular), Brushes.Black, new Point(50, 493));
```