This is actually in reference to Question which is actually closed
Iam using ItextSharp 5.2.1.
I want to make my header text underlined using PdfContentByte. Please provide me the solution.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
to write PDF using pdfcontentbyte we generally use the following
(begin text &
end text)
format
There is an alternative for the above technique also, which is quiet flexible too.
This is if you want the same formatting that you have applied to
pdfcontentbyteusingBaseFontIf you want to underline the text, then inside
PhraseplaceChunkhere the line mentioned below is actually the fix.
For ColumnText we have to provide the text using
new Phrasein which we can access font properties which actuallybase fontwas not allowingus to access.
Inside
PhraseChunkis providing the required formatting to the text.Their are lots of examples available on net regarding use of
chunkIf you want to pass float values like this(20.25)
these will be recognized as double by this class
use “20.25f” then they will be taken as float and will work…