C# Programming
06-09-2011, 03:40 AM
Hi,
I have a couple of headings that need set to bold and underlined but having trouble getting this to work in itextsharp. Writing out to a pdf. I can get the heading set to bold or i can get it underlined but not both at the same time.
Font normalBold = FontFactory.GetFont("times", 10, Font.BOLD);
Font normalBoldUnderlined = FontFactory.GetFont("times",10,Font.UNDERLINE);
I have also tried to create a paragraph but include the heading and set it to underlined but for some reason it sets the whole document underlined..
Paragraph paragraphThree = new Paragraph("Exchanger Represents:\n", normalBold);
paragraphThree.SetAlignment("Justify");
paragraphThree.IndentationLeft = 20;
paragraphThree.Font.SetStyle(iTextSharp.text.Font.UNDERLINE);
Anyone any ideas apart from drawing a line as to how to do this?
Thanks in advance
Paul
I have a couple of headings that need set to bold and underlined but having trouble getting this to work in itextsharp. Writing out to a pdf. I can get the heading set to bold or i can get it underlined but not both at the same time.
Font normalBold = FontFactory.GetFont("times", 10, Font.BOLD);
Font normalBoldUnderlined = FontFactory.GetFont("times",10,Font.UNDERLINE);
I have also tried to create a paragraph but include the heading and set it to underlined but for some reason it sets the whole document underlined..
Paragraph paragraphThree = new Paragraph("Exchanger Represents:\n", normalBold);
paragraphThree.SetAlignment("Justify");
paragraphThree.IndentationLeft = 20;
paragraphThree.Font.SetStyle(iTextSharp.text.Font.UNDERLINE);
Anyone any ideas apart from drawing a line as to how to do this?
Thanks in advance
Paul