For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

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:

0 comments:

Post a Comment

How to make center align child div

 How to make center align child div?   Suppose you have 2 Div tag. And want the make inner tag center <div id="d1">      ...

Ads Inside Post

Powered by Blogger.

Arsip

Blog Archive