I want to insert a large of text into pdf. But i can`t do first line indent after new line feed.
I do this:
var page = pdfDoc.Pages;
var textFragment = new TextFragment(largeText); //large text is string with text on several pages textFragment.TextState.HorizontalAlignment = HorizontalAlignment.Justify; textFragment.TextState.Font = FontRepository.FindFont("Consolas"); textFragment.TextState.FontSize = 12; textFragment.Margin = new MarginInfo(20, 3, 1, 3); textFragment.TextState.LineSpacing = 4; page.Paragraphs.Add(textFragment);
I try to insert some whitespaces before Environment.NewLine in variable largeText. But when i set HorizontalAlignment to Justify there have a different width.
I have tried use negative value of SubsequentLineIndent, but first characters in subsequent lines didn`t fit in TextFragment Rectangle.
Can you help me?