Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Draw line under text

$
0
0
Hi,
I want to draw line under the text (not required classic underlined text, I'll set the color and height of the line). I have TextFragment object by TextFragmentAbsorber.TextFragments. I've tried to create Graph and draw line and could not position the line on the correct place. 
First, what is the correct method? Second, what am I missing to calculate the position? Could you please supply a sample code?
My method is like that:
graph = new Aspose.Pdf.Drawing.Graph((float)textFragment.Page.Rect.Width, (float)textFragment.Page.Rect.Height);
Aspose.Pdf.Drawing.Line line = new Aspose.Pdf.Drawing.Line(new float[] { (float)textFragment.Rectangle.LLX, (float)textFragment.Rectangle.LLY, (float)textFragment.Rectangle.LLX + (float)textFragment.Rectangle.Width, (float)textFragment.Rectangle.LLY});

Thank you

Viewing all articles
Browse latest Browse all 3131

Trending Articles