Right now, I am currently reading in a text file and wrapping the text that is too big for a page. I currently have tabstops set up, but when the text is wrapped, it begins on the left margin again instead of the indent. How would I fix this? Thanks.
EDIT: I have tried messing with the left margin in the rectangle's parameters, but it just shifts the entire text entry over, not just the wrapped lines following the parent line.
linesPerPage = ev.MarginBounds.Height /
printFont.GetHeight(ev.Graphics);
while (lineNumber < linesPerPage &&
((line = streamToPrint.ReadLine()) != null))
{
StringFormat sf = StringFormat.GenericTypographic;
sf.Alignment = StringAlignment.Near;
sf.LineAlignment = StringAlignment.Near;
sf.FormatFlags = StringFormatFlags.LineLimit;
sf.Trimming = StringTrimming.Word;
sf.SetTabStops(0.0f, tabStops);
actual = ev.Graphics.MeasureString(line, printFont,
new SizeF(ev.MarginBounds.Size.Width,
ev.MarginBounds.Size.Height), sf, out charCount, out lineCount);
ev.Graphics.DrawString(line, printFont, Brushes.Black,
new RectangleF(leftMargin, yPos, ev.MarginBounds.Size.Width,
ev.MarginBounds.Size.Height), sf);
yPos += actual.Height;