For smart Primates & ROBOTS (oh and ALIENS ).

Thursday, January 08, 2015

Paragraph overlapping problem in itextsharp

Problem:

If you are working with itextSharp in Dot net winform C# or VB.net then you are very familiar with Paragraph. if  Paragraph font size is big then the Paragraph text will overlap as below example image.

Paragraph overlapping problem in itextsharp
Paragraph overlapping problem in itextsharp


So  how to overcome this problem?

Solution: 

To overcome paragraph text overlapping problem in itextsharp you will use  Paragraph SpacingAfter property.

Example:

Use below C# code, you can convert it into VB.net code if you are working in VB.net.

Paragraph para= new Paragraph("This is a test");
para.Alignment = Element.ALIGN_CENTER;
para.SpacingAfter=50f;
doc.Add(para);
Share:

Related Posts:

0 comments:

Post a Comment

Ads Inside Post

Powered by Blogger.

Archive