J
Jimbo
Hey
Its easy to print a string. You just write:
System.Drawing.Printing.PrintPageEventArgs.Graphics.DrawString("This is a
string!", new Font("Ariel", 14, FontStyle.Bold), Brushes.Black, 0, 782);
Ok, but what if theres more in the string than just "This is a string!"?
What im trying to do is print the text from a multiline textbox. If i use
the above DrawString to write out the text on the printer, it just writes
from right to left, but it does not wrap the text to the next line, when i
run out of paper. Seems like im gonna need a very wide paper (and a printer
support that paper).
I dont know what to do to print the whole string, but to break the string
into an array with 80 characters in each. But there must be a smarter way?
Is there a function to insert a newline every 80th character, or maybe
another way to print out the string than DrawString, or...
Can anyone help?
Its easy to print a string. You just write:
System.Drawing.Printing.PrintPageEventArgs.Graphics.DrawString("This is a
string!", new Font("Ariel", 14, FontStyle.Bold), Brushes.Black, 0, 782);
Ok, but what if theres more in the string than just "This is a string!"?
What im trying to do is print the text from a multiline textbox. If i use
the above DrawString to write out the text on the printer, it just writes
from right to left, but it does not wrap the text to the next line, when i
run out of paper. Seems like im gonna need a very wide paper (and a printer
support that paper).
I dont know what to do to print the whole string, but to break the string
into an array with 80 characters in each. But there must be a smarter way?
Is there a function to insert a newline every 80th character, or maybe
another way to print out the string than DrawString, or...
Can anyone help?