Does anyone know how I can draw a line under the heading (a short line of bold text) that can be located in a random place on the page.
eg.
My Heading 1 ---------------------------------------------- Some random paragraph My Heading 2 ----------------------------------------------
I can do this, as I did above, using the string of the substring _ , but in order to get the string anywhere near the header, I need to set the font size to 2, which leads to a spotty ugly line.
I can also add two pieces on top of each other (one with a title and one with _), similar to the first example in this article http://www.mikesdotnetting.com/Article/82/iTextSharp-Adding-Text-with-Chunks- Phrases-and-Paragraphs , using the same font size, but it only seems to work at the top of the page, as soon as I add other paragraphs and try to do this in the middle of the page, the two pieces are separated with a clear line break at the end of the first fragment.
It seems you can draw lines in iTextSharp, but I donβt know how to calculate the coordinates, since all the examples that I saw use this method to place the line at the top or bottom of the page in a fixed place.
Any help is greatly appreciated.
Cheers Rob
source share