underline portion of text using iTextSharp

前端 未结 2 409
我在风中等你
我在风中等你 2020-12-20 05:37

I have an application that uses itextsharp to fill PDF form fields.

One of these fields has some text with tags. For example:

This text sho         


        
2条回答
  •  执念已碎
    2020-12-20 06:17

    You can trythis

                Chunk chunk = new Chunk("Underlined TExt", FontFactory.GetFont(FontFactory.TIMES_ROMAN, 12.0f, iTextSharp.text.Font.BOLD | iTextSharp.text.Font.UNDERLINE));
                Paragraph reportHeadline = new Paragraph(chunk);
                reportHeadline.SpacingBefore = 12.0f;
                pdfDoc.Add(reportHeadline);
    

提交回复
热议问题