Hi,
I am trying to insert a html. I am getting the output as
· These are impacts****
· these are risks involved in this project and whtejgjgggjgvgjjhkhkhkhkhkhkhkhkhkhkhkh khkhkhkhkhkhkhkhkhkhkhkhkhkhkhhkhkh
· hjkgjgjgggggggggggggggggffffffffffddddddddd ddddddjjjjjjjjjjjjjjjjjjjjjjjjhhhhhhhhhhhhhhhhhhhhh hhhhhjjjjjjjjjjjjjjjjjjjjjjjjhgjdgg
But I want to get tthe output as
These are impacts
these are risks involved in this project and whtejgjgggjgvgjjhkhkhkhkhkhkhkhkhkhkhkh khkhkhkhkhkhkhkhkhkhkhkhkhkhkhhkhkh
Thanks for your request. I think you should play with NumberPosition, TabPosition and TextPosition values in your post-processing code. Please see the following snippet of code:
// Perform post-processing
do {
if (currNode.NodeType == NodeType.Paragraph)
{
Paragraph currentPar = (Paragraph) currNode;
currentPar.ParagraphFormat.LeftIndent = 40;
if (currentPar.IsListItem)
{
currentPar.ListFormat.ListLevel.NumberPosition = 40;
currentPar.ListFormat.ListLevel.TabPosition = 40;
currentPar.ListFormat.ListLevel.TextPosition = 40;
}
}
// move to the next node
currNode = currNode.NextSibling;
}
while (currNode != null && !currNode.Equals(builder.CurrentParagraph));
Change values of NumberPosition, TabPosition and TextPosition as you need.
Best regards.
Hi;
I had tried different number position, text position & tab position.
But I am not getting what I want. Can you please help me out?
I am using this code.
builder.Font.Size = 10;
builder.Font.Name = "Verdana";
builder.Font.Bold = false;
builder.ParagraphFormat.Alignment = ParagraphAlignment.Justify;
currNode = builder.CurrentParagraph;
builder.InsertHtml(Server.HtmlDecode(dtScope.Rows[0][AppConstants.ImpactAndRisks].ToString()));
do {
if (currNode.NodeType == NodeType.Paragraph)
{
Paragraph currentPar = (Paragraph) currNode;
currentPar.ParagraphFormat.LeftIndent = 40;
currentPar.ParagraphFormat.StyleIdentifier = StyleIdentifier.Normal;
if (currentPar.IsListItem)
{
currentPar.ListFormat.ListLevel.NumberPosition = 50;
currentPar.ListFormat.ListLevel.TabPosition = 40;
currentPar.ListFormat.ListLevel.TextPosition = 50;
// currentPar .ListFormat .ListLevel .TrailingCharacter =ListTrailingCharacter .Tab;
// currentPar .ListFormat .ListLevel .Alignment =ListLevelAlignment .Left ;
currentPar.ParagraphFormat.Alignment = ParagraphAlignment.Justify;
}
}
// move to the next node
currNode = currNode.NextSibling;
if (currNode == null)
break;
} while (currNode != (builder.CurrentParagraph));
I am getting the output as
· These are impacts ang ajgghk mjgjg kkhyut jgjght jgy jhjgjg jgg gkhg kgj hkjg khg ,h gjgj jg gjkkhjtj jt t****
· these are risks involved in this project whtejgjgggjg vgjjhkhkhkhk hkhkhkhkhk hkhkh khkhkh khkhkhkhkhkhk hkhkhkhkhkh hkhkh
· hjkgj jggggggg ggggggg gggfffff fffffdd ddddddd ddddddjjj jjjjjjjjj hhhhhhhhh hhhhhj jjjjjjjjjjjjjjjj jjjjjjjh gjdgg
I want the margin as 40.