Debabrata Roy
Debabrata Roy

Reputation: 31

styling text in a pdf using itextsharp in asp.net windows form?

I have created a PDFs file using itextsharp. Now I want to change the text format like bold, italics or times new roman & etc, and I want to change the size of the text. I don't know how to do that. So I need help, you can suggest me any video tutorials also.

Upvotes: 0

Views: 514

Answers (1)

Paulo Soares
Paulo Soares

Reputation: 1916

Here's a way to change the style and color.

FontFactory.RegisterDirectories();
Font font = FontFactory.GetFont("Helvetica", 16, Font.BOLD, BaseColor.RED);
Paragraph para= new Paragrah("Name: " + Textbox1.Text, font);

There are other options for fonts, see here for examples.

Upvotes: 1

Related Questions